The orderby attribute of the woven dream list tag can only be sorted by one Field. If you want to sort Multiple Fields, I have modified PHP in the background to support multi-field sorting. The modification is as follows:
Find the Arc. listview. Class. php file in the main directory include folder, and find
// If you do not use the default sortrank or ID sorting, use the Combined Query (when the data volume is large, it is very slow)
If (preg_match ('/hot | click | lastpost | title/', $ orderby ))
{
$ Query = "select arc. *, TP. typedir, TP. typename, TP. isdefault, TP. defaultname,
TP. namerule, TP. namerule2, TP. ispart, TP. moresite, TP. siteurl, TP. sitepath
$ Addfield
From '#@__ archives' arc
Left join '# @__ arctype 'tp on Arc. typeid = TP. ID
$ Addjoin
Where {$ this-> addsql} $ ordersql limit $ limitstart, $ row ";
}
// In normal cases, first identify the ID from the arctiny table and then query by ID (FAST)
Else
{
$ T1 = exectime ();
$ IDs = array ();
$ Query = "select ID from '#@__ arctiny' arc where {$ this-> addsql} $ ordersql limit $ limitstart, $ row ";
$ This-> dsql-> setquery ($ query );
$ This-> dsql-> execute ();
While ($ arr = $ this-> dsql-> getarray ())
{
$ IDs [] = $ arr ['id'];
}
$ Idstr = join (',', $ IDs );
If ($ idstr = '')
{
Return '';
}
Else
{
$ Query = "select arc. *, TP. typedir, TP. typename, TP. corank, TP. isdefault, TP. defaultname,
TP. namerule, TP. namerule2, TP. ispart, TP. moresite, TP. siteurl, TP. sitepath
$ Addfield
From '##__ archives 'arc left join' ##__ arctype 'tp on Arc. typeid = TP. ID
$ Addjoin
Where arc. ID in ($ idstr) $ ordersql ";
}
$ T2 = exectime ();
// Echo $ t2-$ T1;
}
Replace
If ($ orderby = "default ")
{
$ T1 = exectime ();
$ IDs = array ();
$ Query = "select ID from '#@__ arctiny' arc where {$ this-> addsql} $ ordersql limit $ limitstart, $ row ";
$ This-> dsql-> setquery ($ query );
$ This-> dsql-> execute ();
While ($ arr = $ this-> dsql-> getarray ())
{
$ IDs [] = $ arr ['id'];
}
$ Idstr = join (',', $ IDs );
If ($ idstr = '')
{
Return '';
}
Else
{
$ Query = "select arc. *, TP. typedir, TP. typename, TP. corank, TP. isdefault, TP. defaultname,
TP. namerule, TP. namerule2, TP. ispart, TP. moresite, TP. siteurl, TP. sitepath
$ Addfield
From '##__ archives 'arc left join' ##__ arctype 'tp on Arc. typeid = TP. ID
$ Addjoin
Where arc. ID in ($ idstr) $ ordersql ";
}
$ T2 = exectime ();
// Echo $ t2-$ T1;
}
Else
{
$ Query = "select arc. *, TP. typedir, TP. typename, TP. isdefault, TP. defaultname,
TP. namerule, TP. namerule2, TP. ispart, TP. moresite, TP. siteurl, TP. sitepath
$ Addfield
From '#@__ archives' arc
Left join '# @__ arctype 'tp on Arc. typeid = TP. ID
$ Addjoin
Where {$ this-> addsql} $ ordersql limit $ limitstart, $ row ";
}
Find
Else {
$ Ordersql = "order by arc. sortrank $ orderway ";
}
Replace
Else if ($ orderby = "default "){
$ Ordersql = "order by arc. sortrank $ orderway ";
}
Else {
$ Ordersql = "order by". $ orderby. ", arc. sortrank $ orderway ";
}
Now you can apply Multi-field sorting in the template,
The template application is as follows:
{Dede: List pagesize = '17' orderby = 'arc. Title DESC, arc. id '}