简体   繁体   English

drupal视图将日期添加到节点分类视图

[英]drupal views add date to node taxonomy view

I just created a drupal view. 我刚刚创建了一个drupal视图。 It is showing my nodes from a specific taxonomy with read more links. 它显示来自特定分类法的节点,并显示更多链接。

All is working fine. 一切正常。

This is my code: 这是我的代码:

<?php
// $Id: views-view-unformatted.tpl.php,v 1.6 2008/10/01 20:52:11 merlinofchaos Exp $
/**
 * @file views-view-unformatted.tpl.php
 * Default simple view template to display a list of rows.
 *
 * @ingroup views_templates
 */
?>
<?php if (!empty($title)): ?>
  <h3><?php print $title; ?></h3>
<?php endif; ?>
<?php foreach ($rows as $id => $row): ?>
  <div class="<?php print $classes[$id]; ?>">
    <?php print $row; ?>
  </div>
<?php endforeach; ?>    

From: views-view-unformatted--test-clubnieuws.tpl 来自:views-view-unformatted--test-clubnieuws.tpl

Now I just want to add the node publish date after the node title. 现在,我只想在节点标题之后添加节点发布日期。 How to do this? 这个怎么做?

Thanks 谢谢

<?php if (!empty($date)): ?>     
<?php print $date; ?>
<?php endif; ?>

I suppose you don't need the if statement as if it has a title it should have a date. 我想您不需要if语句,就好像它的标题应该有一个日期一样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM