Drupal 显示节点的修改日期 [英] Drupal Display Modified Date for Node
本文介绍了Drupal 显示节点的修改日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Drupal 中是否有一种简单的方法可以将节点的上次修改日期显示为 node.tpl.php 文件的一部分?
Is there a simple way in Drupal to display the last modified date for a node as part of the node.tpl.php file?
推荐答案
如果你把这段代码放在 node.tpl.php 文件中,它会显示最后一次更改节点的日期:
If you put this code in the node.tpl.php file it will show the date of the last change to the node:
<?php
echo format_date($node->changed);
?>
使用您想要的任何 HTML.
with whatever HTML you want around it.
这篇关于Drupal 显示节点的修改日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文