string SortingEx( string by, mixed page = false, string by_var = "by", string order_var = "order", string anchor = "nav_start" )
The function SortingEx returns HTML code used to display sorting direction visual cues. Usually, the function is used in a table header.
Parameter | Description |
---|---|
by | Value which will be passed to the variable by_var. Usually, the sorting field ID is specified in this parameter. |
page | A page url(with all parameters) to which a link on a sorting direction
arrow will be built. Optional. False by default which means that the current page is used. |
by_var | Name of a variable to receive a value of the parameter by. Optional. The default value is "by". |
order_var | The name of a variable containing the sorting direction: "asc"
(ascending) or "desc" (descending). Optional. "order" by default. |
anchor | An anchor to which a page will be scrolled in browser after setting the
sorting. Optional. "nav_start" by default. |
<table> <tr> <td>ID<br><?=SortingEx("s_id")?></td> <td>Header<br><?=SortingEx("s_name")?></td> </tr> <tr> <td>1</td> <td>Element header</td> </tr> </table>
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |