How can i sort my list page by Desc
zboy812 |
|
---|---|
How can i sort my page.list.data.tpl ? I am aware how to do it with a link: index.php?e=page&c=data&s=desc how can i do this in my .tpl thank you.
<!-- BEGIN: LIST_ROW --> <div style="margin:10px; width:560px; float:left;"> <div class="row-fluid"> <div class="span12" > <!-- ENDIF --> <h3>{LIST_ROW_SHORTTITLE}</h3> <!-- IF {LIST_ROW_DESC} --><p>{LIST_ROW_DESC}</p><!-- ENDIF --> <!-- IF {PHP.usr.isadmin} --><p>{LIST_ROW_ADMIN} ({LIST_ROW_COUNT})</p><!-- ENDIF --> <div> {LIST_ROW_TEXT_CUT} <!-- IF {LIST_ROW_TEXT_IS_CUT} --><br /><a href="{LIST_ROW_URL}" class="btn btn-small btn-primary">{PHP.L.ReadMore}</a><!-- ENDIF --> </div> </div><!-- /span12 --> </div><!-- /row-fluid --> </div> <!-- END: LIST_ROW -->
|
Macik |
|
---|---|
Are you speak about output some UI elements to control pages sorting mode within category list? If so...
In your TPL: <a href="{PHP.c|cot_url('page','c=$this&s=desc&w=asc')}" rel="nofollow">{PHP.R.icon_down}</a> <a href="{PHP.c|cot_url('page','c=$this&s=desc&w=desc')}" rel="nofollow">{PHP.R.icon_up}</a> {PHP.L.Description} So you get something like this:
By the way — i'd open corresponding issue on github (#1506). https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F |
zboy812 |
|
---|---|
Hi thank you for your response, i need to sort the output without any UI . I need to sort the output by default. |
Macik |
|
---|---|
You can configure `default sort mode` for certain catagory: Administration panel → Extensions → Pages → Structure → Catagory → Config, options `Sorting column` and `Sorting direction`. https://github.com/macik
правильный хостинг — https://goo.gl/fjCa1F |
zboy812 |
|
---|---|
That was exactly what i wanted, thank you!!!! |