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屋!
查看全文