Smart Tag calling topic navigation skills

Source: Internet
Author: User

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 >}





[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]
topic navigation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.