We have different needs when building a website, such as creating a column navigation for the page, using dedecms How to extract a column and sub-column name and link it? As shown, list the specified top-level columns first, and then list all the sub-columns in the column below.
Before Ytkah said Dedecms call the current column of the sub-column how to operate, we can divergent thinking to expand it?
First, specify the top-level column, take myopia as an example, typeID is 8
{dede:type typeid= ' 8 '}<a href= "[field:typeurl/]" >[field:typename/]</a>{/dede:type}
Then list all the sub-columns of myopic columns, actually just add a typeid call
{Dede:channel typeid= ' 8 ' type= ' son ' row= '<li><a href= ' [field:typeurl/] ' >[field:typename/] </a></li>
Additional introduction to the various column name call method:
1, {Dede:field name= "typename"} This is the name of the calling current column
2. {dede:channel type= ' son ' row= ' 5 '} <a href= "[field:typeurl/]" >[field:typename/]</a> {/dede:channel} This is the call to the top channel all the word column, row represents the call 5
3, {dede:type typeid= ' column ID '} <a href= "[field:typeurl/]" >[field:typename/]</a> {/dede:type} represents the column that invokes the specified ID, However, only one can be called, and multiple calls can only be repeated multiple times to call the label
4, {dede:channel type= ' top '}<a>[field:typename/]</a> {/dede:channel} call sub-column of the current top-level column name
Dedecms extract a column and sub-column name to the homepage how to get