Pursuing a dream home / List articles sorted by weight

dede: arclist sort output by weight article

Need to open /include/taglib/arclist.lib.php found

else if($orderby == 'rand') $ordersql = "  ORDER BY rand()";

Below it added

else if($orderby == 'weight') $ordersql = "  order by arc.weight $orderWay";

dede: arclist by weight sort of label wording

  1.  
    { dede:arclist typeid='1' row='8' isweight='y' orderby='weight' orderway='asc'}
  2.  
    <li> <span>权重:[field:weight /]</span><a href="[field:arcurl /]">[field:title /]</a></li>
  3.  
    {/ Grandfather: arclist}

dede: list sorted by weights output article

Need to open /include/arc.listview.class.php found

else if($orderby=="lastpost") {

Added on top of it

  1.  
    else if($orderby == 'weight') {
  2.  
    $ordersql = " ORDER BY arc.weight $orderWay";
  3.  
    }

Figure

Continue to find

/hot|click|lastpost

Change

/hot|click|lastpost|weight

Figure

dede: list sorted according to the weight of the label wording

  1.  
    {dede:list pagesize= '10' orderby='weight' orderway='asc'}
  2.  
    <li>
  3.  
    <a href= "[field:arcurl/]" class="title">[field:title/]</a>
  4.  
    <p class="intro"> [field:description/]... </p>
  5.  
    </li>
  6.  
    {/ Grandfather: list}

Note: weights are sorted to the smaller value ahead of the

Guess you like

Origin www.cnblogs.com/sjzgk/p/12448304.html