This has no doubt been asked a thousand times but I couldn't find it on a search.
I have three pages that are accessed one from the other like so: page1 -> page2 -> page3.
I would like the user to be able to go back up as well via the breadcrumb trail. How to do get the breadcrumb trail to reflect this? All it shows is "Home".

Comments

styro’s picture

You could try putting them into a hierarchy using the book module.

Breadcrumbs don't reflect a list of where you've been but where you are in a hierarchy. So if the pages are all siblings of each other, you won't find them listed like that (ie one after the other) in a breadcrumb trail.

To get something like 'page1 -> page2 -> page3', page2 would have to be a child of page1 and page3 would have to be a child of page2 etc.

--
Anton

Jaza’s picture

If you have the menu module enabled, you can go to 'administer -> menus' on your site, and create menu items for each node. If you made the menu items for page2 a child of the item for page1, and do likewise with page3, you'll get hierarchical breadcrumbs (and a navigation block, if it's turned on) for your pages. In Drupal 4.7, you can create menu items at the same time that you create your nodes - in Drupal 4.6, you can use the menu_otf module to achieve the same thing.

The book module creates breadcrumbs for you automatically, and it displays things like a tabls of contents and 'prev/next/up' links on each page. Which method you choose depends on your needs.

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

Raymondo’s picture

Sounds like the book module is the way to go because I don't want these pages linked to a menu, not unless I absolutely have to!
So, having enabled the book module, how do I change a page to a book page? There doesn't seem to be a way to do it in administer >> content. I clicked the "more help" link there and it said I could administer nodes at administer >> content >> configure >> content types, but there is no "configure" option at administer >> content.
By the way, I'm using 4.7, not 4.6. I selected that accidentally.

Edit: Okay, I went to the db and changed the node type for the relevant pages. That worked fine. I then set up the hierarchy, but it's not what I expected. I thought that the breadcrumb trail at the top of the screen would reflect where the user was. Instead, I get a kind of navigation at the bottom and the breadcrumb still just says "Home".
I'll go off and try the menu idea, though I don't really want this!

Drupal is a great system, but the more I get into it, the more it annoys me. Perfection is a myth!

wellsy’s picture

visit each node and set the 'outline'
node/your_node_ID/outline

and choose which book it is in

wellsy

orchidsonline.com.au

Raymondo’s picture

I've abandoned the book idea. It made the pages messy. My pages contain data tables, the 'lower' one is accessed through elements in the 'upper' one - essentially a one-to-many relationship.
Menus do give me what I want in terms of an appropriate breadcrumb trail but I really don't want to use menus.
The long and the short of it is, For the five pages that this involves I'll create my own breadcrumbs so that I can do away with the menus.
Thanks for the suggestions.
____________________________________
Perfection isn't just elusive, it's a myth!

Jaza’s picture

If you don't like the way the book module is presenting nodes to you, you can override the template in your site's theme (by overriding the book module's theme_book_navigation() function). Your override can remove all the custom elements that the book module adds (that is, prev/next/up links and table of contents). If you're using the bluemarine theme with PHPTemplate, for example, you'd add this to your theme's template.php file:

/**
 * Overrides the presentation of book nodes.
 */
function bluemarine_book_navigation($node) {
  return '';
}

Jeremy Epstein - GreenAsh

Jeremy Epstein - GreenAsh

Rosamunda’s picture

Your tip worked excellent!
I wasn´t using the book module because of that reason!

Sweet! :-)

Rosamunda
Buenos Aires | Argentina
www.ligadelconsorcista.org