V9 the way to call sub-columns in the parent column _php tutorial

Source: Internet
Author: User
We do the template sometimes need to use the Call column sub-column, the following article will teach you to achieve the purpose, quite simple. The code is as follows:

In < span=""> the call:


{php $j = 1;}
{loop subcat ($parentid) $v}
{PHP if ($v [' type ']!=0) continue;}
[{$v [catname]}]
{/loop}

In < span=""> the call [or 1-level section of the topic page]:



{php $j = 1;} {loop subcat ($catid) $v}
{PHP if ($v [' type ']!=0) continue;}
[{$v [catname]}]
{/loop}


PS: < span=""> when called, you can also call this:
{pc:content action= "category" Catid= "$parentid" num= "siteid=" $siteid "order=" Listorder ASC "}
{Loop $data $r}
{$r [catname]} |
{/loop}
{/PC}

The parameters are shown in the following table:

Field type Default Value Description
< span=""> smallint No Column ID
SiteID tinyint (3) 0 Site ID
Module varchar (15) No Module ID
Type tinyint (1) 1 Column type ID
ModelID tinyint (5) 5 Model ID
ParentID smallint (5) 5 Parent column
Arrparentid varchar (255) No All parent Columns
Child tinyint (1) 0 Sub-column
Arrchildid Mediumtext No All sub-columns
CatName varchar (30) No Column Name
Image varchar (100) No Column pictures
Description Mediumtext No Column description
Parentdir varchar (100) No Parent Column Directory
Catdir varchar (30) No Column Catalogue
Url varchar (100) No Column links
Items Mediumint (8) 0 Number of column contents
Hits Int (10) 0 Number of clicks
Setting Mediumtext No Column Settings
Listorder smallint (5) 0 Sort
Ismenu tinyint (1) 0 is displayed
< span=""> tinyint (1) 0 Whether to build to the root directory
Letter varchar (30) No Section Pinyin

http://www.bkjia.com/PHPjc/440388.html www.bkjia.com true http://www.bkjia.com/PHPjc/440388.html techarticle We do the template sometimes need to use the Call column sub-column, the following article will teach you to achieve the purpose, quite simple. The code is as follows: in call:!--* Get sub-columns ...

  • 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.