Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a per-page option to control breadcrumb generation #20

Merged
merged 2 commits into from
Feb 17, 2019
Merged

Adding a per-page option to control breadcrumb generation #20

merged 2 commits into from
Feb 17, 2019

Conversation

DanielFlaum
Copy link
Contributor

@DanielFlaum DanielFlaum commented Nov 25, 2018

This pull request implements a per-page option named may_descend. When added to a page's YAML frontmatter, the plugin omits the breadcrumbs of any page which is beneath the current page in the hierarchy.

It also adds extensive commenting. I wrote that as part of working to understand the existing code. We can of course remove it if we feel it is too verbose.

…articular page by adding appropriate configuration in the page's YAML frontmatter.

The functionality is implemented as part of the main loop for generating 
breadcrumb information in Breadcrumbs::build(). Each page's frontmatter 
is checked and, if configuration is found indicating that breadcrumbs 
beneath the current page should be truncated, the $hierarchy variable in 
which breadcrumb information is accumulated is emptied.
@rhukster rhukster merged commit 77106bd into getgrav:develop Feb 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants