In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
The editor will share with you the method of judging the custom attributes of the article when weaving dreams and calling the article list. I hope you will gain a lot after reading this article. Let's discuss it together.
How to judge the custom attributes of articles when dream-weaving calls the article list?
When Dream Weaving dedecms calls the article list, it judges the article custom attributes.
Sometimes we need to judge the attributes of the article to give the corresponding attributes the corresponding style, such as adding recommended logos for recommended articles and so on.
For example, the following code can determine whether the article is recommended and picture, and output in different styles:
[field:array runphp='yes'] if (@ me ['flag'] = =' c flag'') @ me=' recommendation'; else @ me=''; [/ field:array]
The above code can be embedded in the {dede:list} tag. A complete example is as follows:
{dede:list pagesize='10'} [field:array runphp='yes'] if (@ me ['flag'] = =' c flag'') @ me='
'; elseif (@ me [' flag'] = = 'flag'' | | @ me ['flag'] = =' c flag'') @ me='
'; else @ me=''; [/ field:array] [field:array runphp='yes'] @ me= (empty (@ me [' litpic'])? ":"
"); [/ field:array] [field:title/] {/ dede:list} after reading this article, I believe you have a certain understanding of the method of judging the custom attributes of the article when you call the article list. Want to know more about it. Welcome to follow the industry information channel. Thank you for your reading!
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.