Security ContentAccess.GetBrowsableWhere Example

The query returns only items for which the current user has a browse access level of at least 100.

A join is made using the alias 'c' that was given to vwcontent. This alias is passed as the first parameter of the GetBrowsableWhereClause viper.

Smartsite SXML CopyCode image Copy Code
<se:sqlquery 
    sql="select nr,title from vwcontent c where parent=24658 and {security.contentaccess.getbrowsablewhere('c', 100)}">
    <se:parameters>
        <se:parameter name="rowformat">{this.field(title)}</se:parameter>
        <se:parameter name="rowdelimiter"><br />
        </se:parameter>
    </se:parameters>
</se:sqlquery>
Example Result CopyCode image Copy Code
Example item 1<br />
        Example item 3<br />
        Example item 4