Breadcrumb links are provided by the Zendesk {{breadcrumbs}}
helper, but changes are possible using HTML and CSS.
Wrapping the breadcrumbs markup in a container with utilities can change its appearance:
A little custom CSS can be used to change the appearance of the links.
The article
, post
, contribution
and search_result
objects all have a path_steps
array describing the path to the object. More complex patterns are possible using these path_step
objects:
The same approach can be used to present a single path step to create a Back button:
Or to make long breadcrumb links automatically truncate on smaller screen sizes:
The HTML for breadcrumbs is provided by the Zendesk {{breadcrumbs}}
helper and cannot be modified directly.
You can use breadcrumbs patterns by copying and pasting the code into the position you’d like them to appear on any page that supports the helper:
- Article page
- Category page
- Contributions page
- Request page
- Request List page
- Search Results page
- Section page
- Following page
- New Community Post page
- Community Post page
- Community Topic List page
- Community Topic page
- Community Post List page
Customizing helper output
Despite the breadcrumb HTML being generated by Zendesk, it is possible to customize the appearance of the element in several ways:
-
Update one or more of the Sass variables described below and recompiling the theme stylesheet.
-
Add your own custom CSS in the theme’s
style.css
file targeting the.breadcrumbs
element. -
Use HTML elements and utilities to wrap the
.breadcrumbs
element, as some of our patterns do. -
Generate your own markup using the array of
path_steps
objects, where available.The
article
,post
,contribution
andsearch_result
objects all have apath_steps
array describing the path to the object. You can use these to generate your own custom HTML and thereby create an entirely custom look-and-feel without affecting instances of breadcrumbs elsewhere in the help center generated with the{{breadcrumbs}}
helper.
For a complete list of available Sass variables, please refer to the breadcrumbs element page.