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

Add option to ignore current page #10

Open
Regaez opened this issue Oct 24, 2017 · 2 comments
Open

Add option to ignore current page #10

Regaez opened this issue Oct 24, 2017 · 2 comments

Comments

@Regaez
Copy link
Contributor

Regaez commented Oct 24, 2017

I think it would be nice if there could be an option to include/exclude the current page on the breadcrumb trail, similar to how you can optionally include home.

(I'll open a PR for this soon)

Regaez pushed a commit to Regaez/grav-plugin-breadcrumbs that referenced this issue Oct 24, 2017
Regaez pushed a commit to Regaez/grav-plugin-breadcrumbs that referenced this issue Oct 24, 2017
Regaez pushed a commit to Regaez/grav-plugin-breadcrumbs that referenced this issue Oct 24, 2017
Regaez pushed a commit to Regaez/grav-plugin-breadcrumbs that referenced this issue Oct 24, 2017
rhukster pushed a commit that referenced this issue Oct 24, 2017
* #10 add option to ignore current page

* #10 update blueprints with new setting

* #10 add option documentation to readme

* #10 fix typo in readme
@Sogl
Copy link

Sogl commented Nov 13, 2017

@Regaez But what if I want to include current in some pages, but in other not. How to manipulate with this option from twig?

@Regaez
Copy link
Contributor Author

Regaez commented Nov 13, 2017

It's currently a global plugin option, so you are unable to do this on a page-by-page basis.

You could, however, set ignore_current to false, and then override the twig template in your theme so that it filters out the last breadcrumb item depending on some page header value.

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

No branches or pull requests

2 participants