Posted by Sergey
2016-01-19

Hello again dear Tom.
This time please help me with links. I wanna do a sorting by date creating or date editing strings like:
<a href="?_sc=customers/&sr:def:rlog_edit_date_time=19.01.16; ?>"19.01.16</a> but this not working, and even this: <a href="?_sc=customers/&sr:def:rlog_edit_date_time=<?php echo $hm->Zb('rs:def:rlog_edit_date_time'); ?>". What's my problem or what i'm doing wrong. Please help. Thank you for fast reply. And sorry for my bad english.
Posted by Tom
2016-01-20

To sort in cls_rlog_date_time, you need to add (sr) to rlog_edit_date_time array.

To do so, open web/codelib/asc/df.fl.address.inc.php and find the following array.
'rlog_edit_date_time'=>array(
XA_CLASS=>'cls_rlog_date_time',
XA_CAPTION=>RSTR_EDIT_DATE_TIME,
XA_FORMAT=>'Y-m-d H:i:s',
XA_LIST=>'(rlog)(edit_save)'
),
Add (sr) to XA_LIST. The result should look like:
'rlog_edit_date_time'=>array(
XA_CLASS=>'cls_rlog_date_time',
XA_CAPTION=>RSTR_EDIT_DATE_TIME,
XA_FORMAT=>'Y-m-d H:i:s',
XA_LIST=>'(rlog)(edit_save)(sr)'
),
Now you can sort records by cls_rlog_date_time.
For example, suppose the table name is address
*Sorting in ascending order
index.php?_sc=address/&rs:def:_lv:ob=cls_rlog_date_time%20ASC
*Sorting in descending order
index.php?_sc=address/&rs:def:_lv:ob=cls_rlog_date_time%20DESC