Links and names of parent columns called by Zhimeng

Source: Internet
Author: User
: This article mainly introduces the links and names of parent columns called by Zhimeng. For more information about PHP tutorials, see. Open a file
/include/taglib/channel.lib.php

Find code

else if($type=='self'){    if($reid==0) return '';    $sql = "SELECT id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath        FROM `#@__arctype` WHERE reid='$reid' And ishidden<>1 order by sortrank asc limit 0, $line ";}
Add
else if($type=='topone'){if($reid==0) return '';$rowR = $dsql->GetOne("SELECT * FROM `dede_arctype` WHERE id='$typeid' ");$topids = $rowR['topid'];$sql = "SELECT id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepathFROM `dede_arctype` WHERE reid='0' And id='$topids' And ishidden<>1 order by sortrank asc limit 0, $line ";}else if($type=='fatherlist'){$rowR = $dsql->GetOne("SELECT * FROM `dede_arctype` WHERE id='$typeid' ");$reid = $rowR['reid'];$rowR = $dsql->GetOne("SELECT * FROM `dede_arctype` WHERE id='$reid' ");$reid = $rowR['reid'];$sql = "SELECT id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepathFROM `dede_arctype` WHERE reid='$reid' And ishidden<>1 order by sortrank asc limit 0, $line ";}
Then you can call the parent and parent top columns in the template:
{dede:channel type='fatherlist'}[field:typename/]{/dede:channel}
{dede:channel type='topone'}[field:typename/]{/dede:channel}

Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

The above section describes the parent-level topic links and names of Zhimeng calls, including relevant content, and hopes to help those who are interested in PHP tutorials.

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.