Home > php教程 > php手册 > smarty模板中给信息添加最新标签

smarty模板中给信息添加最新标签

WBOY
Release: 2016-06-13 09:36:14
Original
1063 people have browsed it

smarty模板中给信息添加最新标签的方法,如下设置离当前时间24小时之内添加的信息标题后面添加显示new字符标签:

{if $smarty.now-$article.add_time lt 86400}[ new ]{/if}
Copy after login

您可能感兴趣的文章

  • smarty模板中如何生成随机数
  • smarty模板中使用php函数以及smarty模板中如何对一个变量使用多个函数
  • smarty模板中判断数组为空的方法
  • smarty 模板中循环表格补充不全的td
  • 程序中通过define定义的常量如何在smarty模板中使用
  • smarty模板中for循环的扩展插件
  • thinkphp模板中判断volist循环的最后一条记录
  • jquery实现随滚动条滚动而加载数据的功能
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template