V9 parent topic calls the subtopic method. 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 :! -- * To obtain subtopics, we need to call subtopics when creating templates. the following article will teach you how to achieve the goal, which is quite simple. The code is as follows:
In the call:
{Php $ j = 1 ;}
{Loop subcat ($ parentid) $ v}
{Php if ($ v ['type']! = 0) continue ;}
[{$ V [catname]}]
{/Loop}
On the topic page of the [or level 1 topic]:
{Php $ j = 1 ;}{ loop subcat ($ catid) $ v}
{Php if ($ v ['type']! = 0) continue ;}
[{$ V [catname]}]
{/Loop}
PS: When calling, you can also call it like this:
{Pc: content action = "category" catid = "$ parentid" num = "25" siteid = "$ siteid" order = "listorder ASC "}
{Loop $ data $ r}
{$ R [catname]} |
{/Loop}
{/Pc}
Parameters are as follows:
| Field |
Type |
Default value |
Description |
|
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? |
|
Tinyint (1) |
0 |
Generate to root directory? |
| Letter |
Varchar (30) |
None |
Topic pinyin |
Bytes. The code is as follows :! -- * Obtain subtopics...