2
我正在使用Drupal 7和Garland主题。最近的内容块当前显示最近修改的节点的标题名称以及相应用户的用户名。从最近的内容块中删除用户名Drupal 7
我想从显示中删除用户名。 我不会接受使用Views模块的解决方案。
非常感谢!
我正在使用Drupal 7和Garland主题。最近的内容块当前显示最近修改的节点的标题名称以及相应用户的用户名。从最近的内容块中删除用户名Drupal 7
我想从显示中删除用户名。 我不会接受使用Views模块的解决方案。
非常感谢!
您需要修改Garland主题,以便它不显示用户名作为该块的一部分。您可以通过添加以下代码/themes/garland/template.php年底在加兰主题如此直接的做:
/**
* Returns HTML for a recent node to be displayed in the recent content block.
*
* @param $variables
* An associative array containing:
* - node: A node object.
*
* @ingroup themeable
*/
function garland_node_recent_content($variables) {
$node = $variables['node'];
$output = '<div class="node-title">';
$output .= l($node->title, 'node/' . $node->nid);
$output .= theme('mark', array('type' => node_mark($node->nid, $node->changed)));
$output .= '</div>';
return $output;
}
只需保存,然后清除所有的缓存(下管理|性能)。
但是,我建议你创建一个Garland主题的副本,并在/ sites/all/themes /下创建一个新主题。然后在那里修改template.php。这是如此,如果你升级你不改变你的改变(因为加兰是Drupal核心的一部分)。