Skip to content

Custom Breadcrumbs API submodule

Laryn edited this page Mar 27, 2023 · 1 revision

Custom Breadcrumbsapi provides a simple api that allows custom breadcrumbs to be defined for module pages that use a theme template or a custom_breadcrumbsapi hook. For the latter, module developers need to provide a moduleName_custom_breadcrumbsapi() function that returns an array containing the names of the module pages for which custom breadcrumbs may be defined. Then, in the callback functions for each of those pages, the following lines needs to be inserted:

backdrop_alter('breadcrumb', $breadcrumb, 'module_page_name');

within the function, preferably after defining $breadcrumb but before setting the breadcrumb.

Clone this wiki locally