We need to use subtopics of calling columns when creating templates. The following article will teach you how to achieve the goal, which is quite simple. The Code is as follows:
On the second-level column list page, call:
<! --
* Obtain subtopics
* @ Param $ parentid parent ID
* @ Param $ type topic type
* @ Param $ whether self contains itself 0 is not included
* @ Param $ siteid site ID
-->
<Divclass = "arrchildid_list">
{PHP $ j = 1 ;}
{Loop subcat ($ parentid) $ v}
{PHP if ($ V ['type']! = 0) continue ;}
<A href = "{$ V [url]}"> [{$ V [catname]}] </a>
{/Loop}
</Div>
On the first-level topic list page, call the [or first-level topic page]:
<! --
* Obtain subtopics
* @ Param $ parentid parent ID
* @ Param $ type topic type
* @ Param $ whether self contains itself 0 is not included
* @ Param $ siteid site ID
-->
<Divclass = "arrchildid_list">
{PHP $ j = 1 ;}{ loop subcat ($ catid) $ v}
{PHP if ($ V ['type']! = 0) continue ;}
<A href = "{$ V [url]}"> [{$ V [catname]}] </a>
{/Loop}
</Div>
PS: when calling the list page of the second-level column, you can also call it as follows:
{PC: Content action = "category" catid = "$ parentid" num = "25" siteid = "$ siteid" Order = "listorder ASC "}
{Loop $ data $ R}
<A href = "{$ R [url]}" >{$ R [catname]} </a> <span >|</span>
{/Loop}
{/PC}
Parameters are as follows:
Field |
Type |
Default Value |
Description |
Catid |
Smallint |
None |
Topic ID |
Siteid |
Tinyint (3) |
0 |
Site ID |
Module |
Varchar (15) |
None |
Module ID |
Type |
Tinyint (1) |
1 |
Topic type ID |
Modelid |
Tinyint (5) |
5 |
Model ID |
Parentid |
Smallint (5) |
5 |
Parent topic |
Arrparentid |
Varchar (255) |
None |
All parent Columns |
Child |
Tinyint (1) |
0 |
Subtopic |
Arrchildid |
Mediumtext |
None |
All subtopics |
Catname |
Varchar (30) |
None |
Topic name |
Image |
Varchar (100) |
None |
Topic Image |
Description |
Mediumtext |
None |
Topic description |
Parentdir |
Varchar (100) |
None |
Parent topic directory |
Catdir |
Varchar (30) |
None |
Topic directory |
URL |
Varchar (100) |
None |
Topic Link |
Items |
Mediumint (8) |
0 |
Number of topic content |
Hits |
INT (10) |
0 |
Clicks |
Setting |
Mediumtext |
None |
Topic settings |
Listorder |
Smallint (5) |
0 |
Sort |
Ismenu |
Tinyint (1) |
0 |
Show? |
Sethtml |
Tinyint (1) |
0 |
Generate to root directory? |
Letter |
Varchar (30) |
None |
Topic pinyin |