I'm new to Drupal and love it. I tested Joomla and it sucked. Anyway...

I'm creating a whole website with Drupal and I want one of the website sections to be a blog. I.e. mywebsite.com and mywebsite.com/blog

I went to Administer » Site building » Menus and added a Primary Link to /blog. Now mywebsite.com/blog shows all my posts and other user's blog posts. Here are my questions:

1. Why doesn't this blog page show up in the Breadcrumbs? If I'm at My Blog (/blog/1) then the breadcrumbs show Home » Blogs, but if I'm at /blog the breadcrumbs only show Home.

2. How do I remove the link to my own blog (/blog/1) at the bottom of each post next to the Add a Comment?

Please please please help me out. Thanks!


ultimateboy’s picture

I hope I can answer your questions.

1. The purpose of Breadcrumbs is to show everything 'behind' the current page. Because your blog is 'under' the "Blogs", "Home » Blogs" will appear as its breadcrumbs. The only thing 'under' the main blog page is "home" and therefore only "Home" will appear in its breadcrumbs. My guess ( I am new to drupal so dont take my word for it) is that you might be able to accomplish this through taxonomy. But again, I am unsure.

2. I believe the only way to get rid of this link is to go into the code and edit the following file /modules/blog/blog.module

Remove or comment out the following bit of code

function blog_link($type, $node = NULL, $teaser = FALSE) {
  $links = array();

  if ($type == 'node' && $node->type == 'blog') {
    if (arg(0) != 'blog' || arg(1) != $node->uid) {
      $links['blog_usernames_blog'] = array(
        'title' => t("@username's blog", array('@username' => $node->name)),
        'href' => "blog/$node->uid",
        'attributes' => array('title' => t("Read @username's latest blog entries.", array('@username' => $node->name)))

  return $links;

And you should be good to go.

I hope these answers help.

-- matt tucker

gollyg’s picture

Drupal 5 allows you to modify all of the links at the theme level - this will mean that you don't need to hack a core module.

Create a file node-blog.tpl.php in your theme folder (easiest way is to simply copy node.tpl.php). This will automatically target blog nodes.

By default the node file will print an aggregated variable $content - often, as in your case, this is not desirable. You can access individual chunks of content via the $node variable.

One of the variables $node->links will, from memory, be an associative array of all the links that are being rendered in the content. You can then use whatever method you like to unset these items.

You will need to pull in the other variables as well, but this is not that hard. To check what variables are available throw this bit of code into the tpl file:

<?php drupal_set_message('<pre>'.print_r($node, true).'</pre>'; ?>

This will set a message box that shows the structure of the current node object.

blogjunkie’s picture

Hi guys thanks for your suggestions. I'll give it a try but I think there has to be an easier way to start a blog with drupal...

gollyg’s picture

ermm, it sound like you have started a blog with drupal, now you are customising it?

ultimateboy’s picture

Indeed. That is the understanding that I am under. To start a blog, just go under Administer > Modules and check the check box next to blog. Click submit. The blog should now be setup. Go under permissions and make sure they are all set how you would like..

From your first post, it seems like you have already installed your blog and now you are just trying to change a few things about it. Changing thins about modules is never 'easy'.. you can't just click edit and make your changes as with the rest of drupal.. but still, much easier than codding the thing from scratch.


-- matt tucker

ultimateboy’s picture

I was working on a problem which was, in a way, related.. and in the mean-time I found an answer to your first question. Check out the module Taxonomy Breadcrumbs.. it seems like there might be a light at the end of your tunnel.

Hope this helps,

-- matt tucker

blogjunkie’s picture

Will do, thanks matt