Destoon implementation calls the current column classification and sub classification and class three classification method _php instance

Source: Internet
Author: User

Calling the current column classification and sub classification and class Three classification is commonly used in the program design, this article will detail the Destoon implementation calls the current column classification and sub classification and three-level classification methods. The specific actions are as follows:

The following invocation statement is provided in Destoon:

First-level category name:

{$m [catname]} 

Level two category name:

{$c [catname]} 

Level three category name:

{$b [catname]} 

A specific invocation example is as follows:

First, call the category name and link directly:

{Loop $maincat $i $m}<dl>
   {php $child = get_maincat ($maincat, $CATEGORY, 1);}
   <dt><a href= "{$MOD [linkurl]}{$m [Linkurl]}" rel= "external nofollow" rel= "external nofollow" >{$m [CatName] }</a></dt>
   {php $childs = get_maincat ($m [catid], $CATEGORY, 1);}
   {Loop $childs $i $c}<dd><a href= "{$MOD [linkurl]}{$c [Linkurl]}" rel= "external nofollow" rel= "external nofollow "Rel=" external nofollow >{$c [Catname]}</a></dd>{/loop}
</dl>{/loop}

Second, call the classification name and its latest article:

{Loop $maincat $i $m}
 {php $child = get_maincat ($maincat, $CATEGORY, 1);} <div class= "hq01" > <div class= "hq-tt" > <p> 

I hope the method described in this article will help you to destoon development.

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.