Sortorders

Smartsite 7.7 - ...

The sortorders element defines the sort orders on which the user can sort the library result.

XML CopyCode image Copy Code
<sortorders>
 <sortorder caption="MODDATE" sqlclause="c.moddate desc" />
 <sortorder caption="NR" sqlclause="c.nr" />
 <sortorder caption="PARENT" sqlclause="c.parent" />
 <sortorder caption="TITLE" sqlclause="c.title" />
 <sortorder caption="FULLNAME" sqlclause="u.fullname" />
</sortorders>

7.9

As of Smartsite 7.9, the library supports sorting the result by clicking on the column headers, instead of selecting a sort order from the dropdown.

To enable this functionality, you need to indicate for each sortorder element for which column element it defines the sql order by clause.

This is achieved by adding the columname attribute.
The caption attribute is obsolete in this case.

XML CopyCode image Copy Code
<sortorders>
 <sortorder columnname="moddate" sqlclause="c.moddate desc" />
 <sortorder columnname="nr" sqlclause="c.nr" />
 <sortorder columnname="parent" sqlclause="c.parent" />  
 <sortorder columnname="title" sqlclause="c.title" /> 
 <sortorder columnname="fullname" sqlclause="u.fullname" />
</sortorders>

The columnname must refer to a column element, like the example below.

XML CopyCode image Copy Code
<columns namecolumn="title" >
 <column name="nr" caption="NR" />
 <column name="parent" caption="PARENT" />
 <column name="title" caption="TITLE" columntype="HtmlString" />
 <column name="moddate" caption="MODDATE" columntype="DateTime" />
 <column name="fullname" caption="USER" />
</columns>