In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
①: everyone will call the second-level column through dede, but it is a bit troublesome to call the third-level column. How to call the third-level column dede in the following style? As follows:
-- A-level main column
+ Top column
+ second-level column
+ level 3 column (A)
+ level 3 column (B)
+ level 3 column (C)
+ second-level column
+ level 3 column (D)
+ level 3 column (E)
+ level 3 column (F)
-- B-level main column
+ Top column
+ second level column (G)
+ second level column (H)
+ second level column (I)
{dede:channelartlist typeid=6 row=4} (Note: this is the top column id)
{dede:field name='typename'/} (Note: this is the name of the secondary column)
{dede:sql sql='Select * from dede_arctype where reid=~id~ ORDER BY id limit 07'}
[field:typename/]
(note: this is the static path and column name of the third-level column)
{/ dede:sql}
{/ dede:channelartlist}
Because the path stored in the database of [field:typedir /] includes the string {cmspath}, we have to deal with it. We use the cn_substr system function that comes with dedecms. Here we briefly talk about the parameter of this function. @ me is the current field value, that is, the extracted [field:typedir /] value. 200 and 9 indicate that 200 characters are intercepted from the 9th character position (excluding this character).
Typeid='' to specify the top-level column on it, limit0,7 this 7 is to control the number of three-level column display, display style to adjust their own CSS.
②:
There may be many people because of various needs, whether to increase density or operational convenience to enhance the user experience, which will involve the need for dede to add three or more levels of navigation. Let's cut the crap and go straight to the code:
{dede:type typeid='3'} [field:typename/] {/ dede:type} (you can use this if the secondary name above doesn't come out)
{dede:channelartlist typeid='3'}
{dede:field name='typename'/}
{dede:sql sql='Select * from dede_arctype where reid=~id~'}
[field:typename/]
{/ dede:sql}
{/ dede:channelartlist}
The above code can achieve theoretically unlimited levels of depth of navigation menu calls, , of course, as long as you need, can be satisfied, the display effect needs to be modified by CSS.
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.