Weave Dream dedecms Background article list show Author field methods

Source: Internet
Author: User

Ingenious Dream Label Field signed {Dede:field name= function=}

Use the background:

For the sake of the customer, the author of the article under x Classification was designed to be the ID number of the article under the Y category, and then the title was queried according to the ID number of the y category article, which is the name of the X category author.

One, modify the background article List template dede\templets\content_list.htm, in the corresponding location plus

<td>{dede:field name= ' writer ' function= "Get_writer (@me)"/}</td>




Second, add a function to add a get_writer function to the include/extend.func.php


function Get_writer ($a) {global $dsql; $row = $dsql->getone ("Select title from #@__archives where id= ' $a '"); $b = $row [' title '];return $b;}


Three, dede/ content_list.php This file 208 lines to increase Arc.writer, calls to Fields


This article is from the "Shanghai Blue Snail Network" blog, please be sure to keep this source http://viqecel.blog.51cto.com/10859227/1717332

Weave Dream dedecms Background article list show Author field methods

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.