Home > Article > CMS Tutorial > How to judge dedecms template tags
How to judge the dedecms template tag?
dedecms template tags can be judged, but it depends on which tag it is. Some tags cannot be judged. The source file must be changed. There is an example below. Interested friends can refer to
It depends on which tag it is. Some tags cannot be judged. The source file must be changed,
Commonly used loops, autoindex, etc.
Add: runphp="yes" to the tag.
比如:[field:pubdate runphp='yes'] $a="<font color=red>".strftime('%m-%d',@me)."</font>"; $b=strftime('%m-%d',@me); $ntime = time(); $day3 = 3600 * 24; if(($ntime - @me) < $day3) @me = $a; else @me =$b; [/field:pubdate]<br> [field:global name=autoindex runphp="yes"] if(@me%5==0)@me="<hr />"; else @me=""; [/field:global] 这个是判断,列表每隔5行加横线 。
Recommended learning: 梦Weavingcms
The above is the detailed content of How to judge dedecms template tags. For more information, please follow other related articles on the PHP Chinese website!