Home  >  Article  >  Backend Development  >  DreamWeaver calls the parent column link and name

DreamWeaver calls the parent column link and name

WBOY
WBOYOriginal
2016-07-30 13:31:101059browse

Open the file

/include/taglib/channel.lib.php

Find the 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 it after it
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,sitepath
FROM `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,sitepath
FROM `dede_arctype` WHERE reid='$reid' And ishidden<>1 order by sortrank asc limit 0, $line ";
}
can then call the parent column and parent top-level column in the template:
{dede:channel type='fatherlist'}[field:typename/]{/dede:channel}
{dede:channel type='topone'}[field:typename/]{/dede:channel}

Copyright statement: This article is an original article by the blogger and may not be reproduced without the blogger's permission.

The above introduces the link and name of the parent column called by Dreamweaver, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn