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

DreamWeaver calls the parent column link and name

WBOY
Release: 2016-07-30 13:31:10
Original
1087 people have browsed it

Open the file

/include/taglib/channel.lib.php
Copy after login

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 ";
}
Copy after login
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 ";
}
Copy after login
can then call the parent column and parent top-level column in the template:
{dede:channel type='fatherlist'}[field:typename/]{/dede:channel}
Copy after login
{dede:channel type='topone'}[field:typename/]{/dede:channel}
Copy after login

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.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template