As a very popular CMS website system in China, DEDECMS is favored by the majority of webmasters. Many people use DEDE to build websites. When using dede to build a website, some functions need to be changed or called according to your preferences. In dede's official documentation, there is no specific description about how to call the first-level and second-level functions cyclically.
Today, shadow will share with you what webmasters and friends need to achieve the purpose of optimizing website navigation by calling level 1 and level 2 topics cyclically on the homepage of the dede website.
Let's start with the following:
On the homepage, how does one implement the loop call of level 1 and level 2 columns?
In many templates, we will see code similar to the following. This is the code snippet used to call all sub-categories under a specific category cyclically.
--------------------------------
{Dede: channelartlist typeid = '3' row = '4 '}
<Strong> <a href = "{dede: field name = 'typeurl'/}"> {dede: field name = 'typename'/} </a>
<A rel = "external nofollow" href = "[field: arcurl/]"> [field: title/]
{/Dede: arclist}
{/Dede: channelartlist}
--------------------------------
From this we can see that this is a bit similar to the first-level and second-level columns of loop calls, but it has some functional differences. We can perform secondary modifications on this basis to achieve the objective of calling level-1 and level-2 columns cyclically.
The following is the modified implementation method:
--------------------------------
{Dede: channelartlist}
<Dl class = "ilistdh">
<Dt class = "itopdh"> <a href = "{dede: field name = 'typeurl'/}"> {dede: field name = 'typename'/} </a>
<Dd class = "isondh">
{Dede: channel type = 'sun' row = '3'} // here row = 3 only calls three subcolumns
<A rel = "external nofollow" href = "[field: typeurl/]"> [field: typename/] </a>
{/Dede: channel}
</Dd>
</Dl>
{/Dede: channelartlist}
--------------------------------
The above code is the call code of the Shadow website. You can modify it based on your actual situation and then beautify it through css.
Specific results can refer to the http://www.studyonjob.com/home page left navigation is the effect of this method.