How to invoke the column seotitle in the Dream Channel label

Source: Internet
Author: User

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

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.