1. Call the parent topic
The first is the parent page and the second-level column page list.html.
The code is as follows: |
Copy code |
{$ CATEGORYS [$ top_parentid] [catname]} // top-level parent topic name {$ CATEGORYS [$ CAT [parentid] [catname]} // the parent topic name has not been tested. {$ CATEGORYS [$ top_parentid] [XXX]} // related field values of top-level parent columns
|
In list.html or second-level columns, how does one call related columns and information of the Parent column?
The code is as follows: |
Copy code |
{Pc: content action = "category" catid = "$ parentid" num = "25" siteid = "$ siteid" order = "listorder ASC"} // note the parent topic id is $ parentid <Span >{$ CATEGORYS [$ top_parentid] [catname]} </span> {Loop $ data $ r} <A href = "{$ r [url]}" >{$ r [catname]} </a> {/Loop} {/Pc} |
The content below is the internal page show.html
The code is as follows: |
Copy code |
{$ CAT [catname]} // name of the topic on the content page {$ CATEGORYS [$ top_parentid] [catname]} // the name of the content column, which is the same as list.html. {$ CATEGORYS [$ CAT [parentid] [catname]} // parent topic name. |
The following figure shows how show.html calls the topic list of top parent columns.
The code is as follows: |
Copy code |
{Pc: content action = "category" catid = "$ top_parentid" num = "25" siteid = "$ siteid" order = "listorder ASC "} {Loop $ data $ r} // note that the id of the parent topic is $ top_parentid. <A href = "{$ r [url]}" >{$ r [catname]} </a> {/Loop} /Pc} |