The method of adding the latest label to information in smarty template is as follows: Add the new character label after the title of information added within 24 hours from the current time:
{if $smarty.now-$article.add_time lt 86400}[ new ]{/if}
Copy after login
Articles you may be interested in
- How to generate random numbers in smarty templates
- Using php functions in smarty templates and how to use multiple variables on a variable in smarty templates A function
- How to determine if an array is empty in the smarty template
- The loop table in the smarty template is incompletely supplemented with td
- How to use the define constants in the program in the smarty template Use the
- extension plug-in for the for loop in the smarty template
- judge the last record of the volist loop in the thinkphp template
- jquery to implement the function of loading data as the scroll bar scrolls
http://www.bkjia.com/PHPjc/764178.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/764178.htmlTechArticleHow to add the latest tag to information in smarty template, as follows to set the title of information added within 24 hours from the current time Add a new character tag later: {if $smarty.now-$article.ad...