Ability to add breadcrumb to pages that do not display in menu

vinmassaro - June 7, 2009 - 16:51
Project:Menu Breadcrumb
Version:6.x-1.1
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I am trying to add the breadcrumb to a page that I do not want to display in the navigation menu. It does not seem possible to associate a page with a parent menu item without giving it a menu link title (once the page is saved, it does not keep the parent menu item and resets to ). I have a series of pages I would like a breadcrumb to display on, and I don't want them to display in the navigation menu, but I would like them to have a parent navigation item that the breadcrumb is derived from. Currently, it seems the only way to get the breadcrumb to display is to give the page a menu link title so it displays in the navigation menu.

#1

pshahmumbai - October 2, 2009 - 19:16

one way to do this is try hiding/remove them using jQuery/javascript in the theme file.

<script type="text/javascript">
        $(document).ready(function() {
                $('ul.menu li:eq(2)').remove();   /* where 2 is the menu item starting from 0 */
        });
</script>

#2

jweowu - October 3, 2009 - 21:32

Javascript doesn't help the users who aren't running javascript.

You could try using the custom_breadcrumbs module for this, or else write your own code. menu_set_active_trail($trail); and drupal_set_breadcrumb(menu_get_active_breadcrumb()); are good starting points.

menu_breadcrumb is, unsurprisingly, focussed on breadcrumbs for menu items, so I'm not sure this request will be considered relevant.

#3

dboulet - October 5, 2009 - 14:40
Status:active» fixed

One thing that you can do is add a menu item to a menu, and then disable that item so that it doesn't actually show up—Menu breadcrumb will still use it to build the breadcrumbs. If this doesn't work for you, then you'll have to do as jweowu suggested and look for another module, such as custom_breadcrumbs—building breadcrumbs from menu items is the whole point of this module.

#4

System Message - October 19, 2009 - 14:50
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.