咱們在使用織夢5.7系統作網站時,會常常用到{dede:channel}標籤,有時咱們須要調用欄目seotitle字段。好比說:php
{dede:channel type=’sun’ typeid=’1’}sql
<a href=’[field:typelink/]’>[field:typename/]</a>網站
{/dede:channel}url
[field:typename/]這裏要使用{dede:field.seotitle /},也就是說在織夢{dede:channel}標籤中調用欄目seotitle,如何實現?spa
若是要想在織夢{dede:channel}標籤中調用欄目seotitle,咱們須要作一下簡單的二次開發,步驟以下:blog
打開/include/taglib文件夾下的channel.lib.php,找到78行到94行:seo
if($type==’top’)開發
{it
$sql = "SELECT id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepathsql語句
From `#@__arctype` WHERE reid=0 And ishidden<>1 order by sortrank asc limit 0, $line ";
}
else if($type==’son’)
{
if($typeid==0) return ’’;
$sql = "SELECT id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath
From `#@__arctype` WHERE reid=’$typeid’ And ishidden<>1 order by sortrank asc limit 0, $line ";
}
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 ";
}
在sql語句裏補充:Select id,typename,seotitle,.......就能夠調用,以下圖: