Dede calling method for new fields in the content model

Source: Internet
Author: User

Today you need to add some new fields to the content model of the article, adding two fields of the image type, which can not be displayed by the foreground (field cannot be shown). Let's take the first page call as an example: the default call to the article title in the Dedecms template is as follows: {dede:arclist row=6 titlelen=32} [FIELD:DBTP] {/dede:arclist} Then we invoke the custom The field is modified on this basis to achieve, we add two images as an example, the specific label shows: {dede:arclist row=8 titlelen=32 addfields= ' dbtp ' channelid= ' 1 '} [field: dbtp/] {/dede:arclist} we can see 2 different places compared to the first one: 1, titlelen=32 ' addfields= ' DBTP ' at {dede:arclist row=6 channelid=} 1 ', where addfields= ' dbtp ' means to specify the field to be obtained addfields= ' field 1, field ' channelid= ' 1 ' indicates which model the field belongs to, we refer to the article model added to so channelid= value of 1 ..。 Determine the ID of the article model, we found in the article Model Management in the red box is the Model ID 2, but also a "[field:dbtp/]" This is what we added to the field name when adding a field. If you need to call the custom field in {dede:list} on the list page, add "[field:dbtp/]" directly, but only if you have to select the parameter when you add the field. The above is about adding and calling methods for Dedecms custom fields.

Dede method for calling new fields in the content model

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.