We often use the {Dede:channel} tag when using the Dream 5.7 system, and sometimes we need to call the column Seotitle field. For example:
{Dede:channel type= ' Sun ' typeid= ' 1 '}
<a href= ' [field:typelink/] ' >[field:typename/]</a>
{/dede:channel}
[field:typename/] here to use {dede:field.seotitle/}, that is, in the dream {Dede:channel} tag call column Seotitle, how to implement?
If you want to call the column seotitle in the dream {Dede:channel} tab, we need to do a simple two development, the following steps:
Open the/include/taglib folder under Channel.lib.php, and find rows 78 through 94:
if ($type = = ' top ')
{
$sql = "Select Id,typename,typedir,isdefault,ispart,defaultname,namerule2,moresite,siteurl,sitepath
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 ";
}
Add in the SQL statement: Select id,typename,seotitle,....... Can be called, such as:
How to invoke the column seotitle in the Dream Channel label