4

I have a Content Type named Cars and a Views page which lists all those cars. Is it possible to put the Cars content type under The Views page so my breadcrumbs would come out as Home > Cars > Sample Car. Cars is the Views page, Sample Car is the Content Type.

1

For this you will have to use Menu Breadcrumb and Path module

Define your view's path as cars and define path for your Cars type nodes as cars/sample-car

Menu Breadcrumb will do the magic for you to arrange hierarchy of your view and nodes in bread crumb

1
  • Is there a way to do it without the Menu Breadcrumb module? There's no D7 version yet and the dev module seems buggy. – enchance Jun 12 '11 at 7:20
1

Alternate way.... Using Custom module.

function hook_node_view($node, $view_mode, $langcode){
  if($view_mode == 'full' && $node->type =='cars'){
    $bc[] = l('Home', '<front>');
    $bc[] = l('Cars', url('cars'))
    $bc[] = l($node->title, url('node/'. $node->nid));

    drupal_set_breadcrumb($bc);
  }
}
2
  • I'll give this a try. – enchance Jun 14 '11 at 19:10
  • I pasted it in my module and it still showed the default breadcrumbs. Am I forgetting something? – enchance Jun 24 '11 at 17:14
0

The Menu Position module should allow you to do this, and it works for Drupal 7.

0

Use the Crumbs module (7.x-1.2 +). Go to Admin > Structure > Crumbs > Node parent, here you can configure a parent path for each node type, with token support.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.