Phpcms recommendation bit cannot call custom Fields

Source: Internet
Author: User

By default, phpcms cannot use the recommended bit to call custom fields. directly write {pc: content action = "position" posid = "30" catid = "24" order = "listorder DESC" num = "4"}: no error occurs, but data cannot be called, blank is displayed.

Call Code

01. {pc: content action = "position" posid = "30" catid = "24" order = "listorder DESC" num = "4"} 02. {loop $ data $ n $ r} 03. {$ r ["kk_date"]} 04. {/loop} 05. {/pc} Code Description

Action = "position" content recommendation bit list

Posid = "30" Call the content with a recommendation ID of 30

Catid = "24" indicates the content under the call topic ID 24.

Order = "listorder DESC ".

Num = "4" display four items

After the above Code is completed, it is still not displayed. You still need to make some settings for the fields in the phpcms background model management.

Phpcms model settings

Step 2: log on to the phpcms background.

Step 2: open content> content-related Settings> model management> Find your own model.

Step 2: Open the model, find and open "field management", and click "modify" on the fields you want to display ".

Step 2: Select "yes" on the last "to the last" call in the recommendation space tag "and click" OK "to save.

Step 2: click Modify again on the article you want to display normally, and then save the changes to take effect (if you do not change anything, modify and save the changes ).

Step 2: update the website cache to take effect.

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.