Hi guys

I've got a problem.
I woudl like to remove the link called "Create a new Blog entry" from the BLOG
Or I woudl like to add an div containder or a class which would format this link.

THe problem is that the main class is called item-list and if I format this with css then other links in other UL would be formatted too.

I would like to add a format ONLY to this link.

So how can I do this or where I can find the code (maybe in blog blog.module file???) releated to this link?

Cheers

Comments

dailypress’s picture

yes, I would also like to put some space under that link. Where do you make the changes?

anyone?

shoaib.hussain’s picture

I'm also facing same issue...

Drake’s picture

create node-blog.tpl.php (you can copy the node.tpl.php) and could edit this template to get the requirements you need.

Brian.Harris’s picture

You can't remove the link by creating node-blog.tpl.php. The only way i've been able to remove the link is by overwriting theme_item_list with phptemplate_item_list in my template.php file.

I used all the code from theme_item_list but modified the return statement to:

return (!in_array('<a href="/node/add/blog">Create new blog entry.</a>',$items) ? $output : NULL );

Not the best solution, but it works. Hope this helps.

rickiellen’s picture

This suggested modification of the theme_item_list() function did work for me, but I had to change the return test, to work with my local development site:

return (!in_array('<a href="/drupal/node/add/blog">Create new blog entry.</a>',$items) ? $output : NULL );
dharmanerd’s picture

This worked, however it was causing my pager to go missing.

miteshmap’s picture

As the link is by default added from the blog module, we can remove it with hook_menu_local_task_alter using this code.

function modulename_menu_local_tasks_alter(&$data, $router_item, $root_path) {
  if ($root_path == 'blog') {
      unset($data['actions']['output']);
  }
}

Drupal developer
Email Me / Skype: miteshmap