In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article is to share with you about the dedecms custom content model on the home list page and the method of calling tags for content. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.
How does the dedecms custom content model call tags on the home list page and content?
This article describes the home page, list page and content call method of the custom model (independent model) in dedecms. It is relatively simple to establish the custom model (independent model) in the background and add custom fields. Here are two points to pay attention to:
Articles are all about custom fields added to existing models rather than newly created independent models, so it is impossible to call independent models with arclist tags.
The code is as follows:
{dede:arclistsg typeid='8' row='10' addfields='name,sex,tel' channelid='-101'} [field:title/] name: [field:name/] | gender: [field:sex/] | Tel: [field:tel/] {/ dede:arclistsg}
To get the contents of a custom field, two conditions must be met, one of which is indispensable:
1. Specify the channelid property. This is channelid='-101'.
two。 Specify the field to get, addfields=' field 1, field 2'
(2) the list page calls the custom model (stand-alone model):
The code is as follows:
{dede:list pagesize='10' addfields='name,sex,tel' channelid='-101'} [field:title/] name: [field:name/] | gender: [field:sex/] | Tel: [field:tel/] {/ dede:list}
If the column has content, but the list page does not fall out, it must be because the id of your stand-alone model is not negative.
(3) the content page calls the custom field data of the custom model (independent model):
Write {dede:field.name/} directly where you want to call, where name is changed to the name of the field you want to call.
Thank you for reading! About the dedecms custom content model in the home list page and content call tag method to share here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.