2011-06-04 33 views

回答

3

您需要修改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核心的一部分)。