Dream Call Parent Column link and name

Source: Internet
Author: User
Open 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 ";}
After you 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 L Imit 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 ";}
You can then call the parent column and the parent top-level column in the template:
{dede:channel type= ' fatherlist '} [field:typename/] {/dede:channel}
{dede:channel type= ' topone '} [field:typename/] {/dede:channel}

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

The above describes the dream Call parent column link and name, including the aspects of the content, I hope that the PHP tutorial interested in a friend helpful.

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