You can call the topic navigation by querying SQL statements with smart tags. (Of course, topic navigation is generally called using the existing showclasstemp or listshowclass topic navigation label)
Example 1: Smart Tag display topic navigation
<Table width = "200" border = "0" cellpadding = "3" cellspacing = "1" bgcolor = "# 4fb4de">
<Tr>
<TD Height = "25"> <strong> <font color = "# ffffff"> topic navigation </font> </strong> </TD>
</Tr>
[E: loop = {"select classid, classname from {$ dbtbpre} enewsclass where bclassid = parent column ID order by myorder, classid DESC", 0, 24, 0}]
<? PHP
$ Classurl = sys_returnbqclassname ($ bqr, 9); // obtain the topic address
?>
<Tr>
<TD Height = "25" bgcolor = "# ffffff"> <a href = "<? = $ Classurl?> "> <? = $ Bqr [classname]?> </A> </TD>
</Tr>
[/E: loop]
</Table>
Example 2: Use a smart tag to display the topic navigation and set the background of the current ultimate topic to blue
<Table width = "200" border = "0" cellpadding = "3" cellspacing = "1" bgcolor = "# 4fb4de">
<Tr>
<TD Height = "25"> <strong> <font color = "# ffffff"> topic navigation </font> </strong> </TD>
</Tr>
[E: loop = {"select classid, classname from {$ dbtbpre} enewsclass where bclassid = parent column ID order by myorder, classid DESC", 0, 24, 0}]
<? PHP
$ Classurl = sys_returnbqclassname ($ bqr, 9); // obtain the topic address
$ Bgcolor = "# ffffff ";
If ($ bqr [classid] ==$ globals [navclassid])// Current topic ID
{
$ Bgcolor = "# c3efff ";
}
?>
<Tr>
<TD Height = "25" bgcolor = "<? = $ Bgcolor?> "> <A href =" <? = $ Classurl?> "> <? = $ Bqr [classname]?> </A> </TD>
</Tr>
[/E: loop]
</Table>
Example 3: The Smart Tag displays the navigation of the first-level column, and sets the background of the current first-level column as blue when the sub-column is used.
bclassid = 0
if ($ globals [navclassid])
{< br> $ FCR = explode ('| ', $ class_r [$ globals [navclassid] [featherclass]);
$ topbclassid = $ FCR [1]? $ FCR [1]: $ globals [navclassid]; // obtain the ID of the first-level topic of the current topic
if ($ bqr [classid] = $ topbclassid)
{< br> $ bgcolor = "# c3efff";
}< BR >}
topic navigation | [E: loop = {"select classid, classname from {$ dbtbpre} enewsclass where order by myorder, classid DESC ", 0, 24, 0}] $ classurl = sys_returnbqclassname ($ bqr, 9); // obtain the topic address $ bgcolor = "# ffffff "; ?>
|
[/E: loop]