开发者

Drupal: Node Submission Time

开发者 https://www.devze.com 2022-12-16 11:58 出处:网络
How do I print into a block the node submission time. something li开发者_如何学JAVAke... print $node->submitted_time?$node->created is what you\'re looking for.add block -> choose php filter, ad

How do I print into a block the node submission time. something li开发者_如何学JAVAke... print $node->submitted_time?


$node->created is what you're looking for.


add block -> choose php filter, add code:


if ((arg(0) == 'node') && is_numeric(arg(1)) ) {
  $node = node_load(arg(1));
  if ($node) {
    print format_date($node->created);
  }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消