Php Drupal-文本在哪里;提交人:;来自哪里?
我的首页上有新闻,通过Php Drupal-文本在哪里;提交人:;来自哪里?,php,string,templates,drupal-7,drupal-views,Php,String,Templates,Drupal 7,Drupal Views,我的首页上有新闻,通过Viewsplugin显示。我找到了视图项(新闻)模板的位置。我用节点--news.tpl.php覆盖了它,在这里我可以更改新闻项的html。但有: <?php if ($display_submitted): ?> <span class="submitted"><?php print $submitted; ?></span> <?php endif; ?> 返回的一段代码:由Inclusible于2
Views
plugin显示。我找到了视图项(新闻)模板的位置。我用节点--news.tpl.php
覆盖了它,在这里我可以更改新闻项的html。但有:
<?php if ($display_submitted): ?>
<span class="submitted"><?php print $submitted; ?></span>
<?php endif; ?>
返回的一段代码:由Inclusible于2015年10月3日星期二提交-19:40
在内容设置中,只需执行以下操作:
作者:难以置信作者:2015-03-1019:40:15+0100
提交的字符串来自何处?我如何编辑它?默认节点预处理函数中设置了$Submitted变量: 通过在主题的template.php文件中实现,可以覆盖默认值,如下所示:
function MYTHEME_preprocess_node(&$variables) {
$variables['submitted'] = // Your username logic here.
}
function MYTHEME_preprocess_node(&$variables) {
$variables['submitted'] = // Your username logic here.
}