Skip to content

CSS classes in custom breadcrumb elements

Laryn edited this page Dec 8, 2022 · 2 revisions

You can enable this feature on the custom breadcrumbs configuration screen under the HTML element identifiers section. There are several options that provide html class identifiers for theming custom breadcrumb links, including add a custom-breadcrumbs-home ID attribute to the home breadcrumb item, adding numbered class attributes custom-breadcrumbs-item-N for each breadcrumb item, adding even and odd classes to breadcrumb items and storing an identifier that is unique for each defined custom breadcrumbs. Using this last option requires modifying your sites phptemplate_breadcrumb (or theme override) function to actually add the class name to the breadcrumb container. The class name is returned as a string by the function custom_breadcrumbs_unique_breadcrumb_id(). The identifier will be of the form custom-breadcrumbs-type-id where type is the breadcrumb type (node, panels, path, views or taxonomy) and id is the breadcrumb id number. See http://drupal.org/node/643796#comment-2532998 for more information on this feature.

Clone this wiki locally