By default, the node links in the blog page contains blog_usernames_blog
(admin's blog), comment_add
(Add new comment) and node_read_more
(Read more).
I need to get rid of the first 2 of them, and to change the text in node_read_more.
I created a function named $themenamepreprocess_node
into template.php in my theme, with this content:
function mytheme_preprocess_node(&$vars, $hook){
$node = $vars['node'];
//blog node, not in full node page
if($vars['node']->type == 'blog' AND !$vars['page']){
$vars['node']->links['node_read_more']['title'] = t('My custom read more here');
unset($vars['node']->links['blog_usernames_blog']);
unset($vars['node']->links['comment_add']);
}
//debug:
echo "<!-- DEBUG\n";
print_r($vars['node']->links);
echo "\n-->";
}
But it doesnt work; when i print the $vars['node']->links
in the end of the functions, the links array is exactly as i want it; but when the page is rendered, the old default links are showed.
Why? How can i theme the node links just for some content-type and only in the node list page, with theming functions?
p.s: i cleared the cache and the theme registry before every try ;)