In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you so that DEDECMS's list tag to support weight sorting method, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to know it!
How to make the list tag of DEDECMS support weight sorting?
Let the list tag of DEDECMS support weight sorting
Recommended study: dream weaving cms
The DEDECMS system supports document weight weight sorting, which can be used in templates:
{dede:arclist row='10' titlelen='50' orderby='weight'} [field:textlink/] {/ dede:arclist}
Among them, orderby='weight' realizes that documents are sorted by weight. This is the arclist tag and can be used anywhere to call the document list.
However, on the column list page, if you want to use the list tag (to paginate the document list), you also want to sort it with weight
{dede:list pagesize='10' titlelen='50' orderby='weight'} [field:textlink/] {/ dede:list}
You will find that your list is not sorted by weight (weight), no matter how you modify it, its order is still the same!
Reason: dedecms supports weighted weight sorting only arclist tags, not list tags
Solution:
1. Open the file arc.listview.class.php
2. Look for the "else if ($orderby==" lastpost ") {" statement, which is about 609 lines. Press enter before this line and insert the following statement:
Else if ($orderby== "weight") {$ordersql = "orderby arc.weight $orderWay";}
3. Continue to find the "if ('hot | click | lastpost',$orderby)" statement and modify it to:
If (ereg ('hot | click | weight | lastpost',$orderby))
After the modification is completed, save it. If weight sorting has been used in the target, generate it, and you can see that weight sorting has been installed in the document list.
4. Template call
{dede:arclist row='10' titlelen='50' orderby='weight'} [field:textlink/] {/ dede:arclist} above is all the content of the method of making DEDECMS's list tag support weight sorting. Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.