In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
How does dede call the third-level column name and the content list under the column? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!
How does dede call the third-level column name and the content list under the column?
According to the need, the website divides the region into province-city-article hierarchical structure. As the title says, dede how to call the three-level column name and the content list under the column, the specific implementation is as follows, interested friends can refer to
According to the need, the website divides the area into province-city-article hierarchical structure, what the first page of the column needs to show is
The code is as follows:
{dede:channelarclist} Provincial title: {dede:field name='name'/} {dede:channel type='son'} Municipal title: [field:name/] {dede:arclist} the city article {field:title/} {/ dede:arclist} {/ dede:channel} {/ dede:channelarclist}
That is, the provincial columns are classified by city, and the article titles of each city are displayed, but the {dede:channel} tags cannot be nested, so the {dede:arclist} tags will be output as is, the solution:
The code is as follows:
$typeid = $row ['id']; if ((class_exists (' PartView') {$pv = new PartView ($typeid); $text= $likeType; $text= str_replace (array ('{field','/}'), array ('[field','/]'), $text); $pv- > SetTemplet ($text,'string'); $artlist = $pv- > GetResult (); $likeType = $artlist;}
Find if in / include/taglib/channel.lib.php ($col > 1) $likeType. = "\ r\ n"; (v5.6 is 125 lines v5.7 is 156 lines) add the above code to this sentence
Problem solved.
Some people responded that after adding this code, the article page could not be updated with {dede:channel} {/ dede:channel}, so you can take a look at the code and change it like this:
The code is as follows:
If ($sanji) {$typeid = $row ['id']; if ((class_exists (' PartView') {$pv = new PartView ($typeid); $text= $likeType; $text= str_replace (array ('{field','/}'), array ('[field','/]'), $text); $pv- > SetTemplet ($text,'string'); $artlist = $pv- > GetResult (); $likeType = $artlist;}
Then add $sanji = $ctag- > GetAtt ('sanji') after the beginning of the channel.lib.php file global $dsql;
When called, it becomes:
The code is as follows:
{dede:channelartlist} {dede:field name='typeurl'/} {dede:field name='typename'/} / external frame {dede:channel type='sun' sanji='1'} / Sub-frame [field:typename/] {dede:arclist row='5' titlelen='39'} / call article connection: {field:arcurl/} title: {field:title/} {/ dede:arclist} {/ dede:channel} {/ dede:channelartlist}
Problem solved.
Thank you for reading! After reading the above content, do you have a general understanding of how dede calls the third-level column name and the content list under the column? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are 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.