Bitrix Site Manager


 mixed page = false,
 string by_var = "by",
 string order_var = "order"

The function InitSorting initialises parameters of sorting stored in the session, if the sorting was not explicitly specified. If the sorting is explicitly specified the function stores parameters of sorting in the session.

The function handles variables of the global scope. Take it into account when creating the main component files.


page A page for which the sorting is initialised. The false value initialises sorting for the current page.
Optional. False by default.
by_var The name of a variable in which the sorting field ID is passed.
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.

See Also


// if variables $by and $order are explicitly specified, their values are stored in the session
// otherwise they are initialised with values stored in the session
$rsUsers = CUser::GetList($by, $order);