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

Hide "help" from Nav #22

Open
djacris opened this issue Oct 1, 2015 · 0 comments
Open

Hide "help" from Nav #22

djacris opened this issue Oct 1, 2015 · 0 comments

Comments

@djacris
Copy link
Collaborator

djacris commented Oct 1, 2015

Found this... Not sure if it is what is needed tho...

The first being "How do I hide a page from the navigation?"

The simplest way I can think of for this, that is also controllable through Craft, is to create a simple "Hide from navigation" Lightswitch field, and add this to your entry types.

When looping through entries for the navigation, you can check whether the lightswitch has been checked, and if it has, don't show that entry in the nav:

{% for entry in craft.entries.section('lorem').hideFromNavigation(0) %}
--
{% endfor %}

@djacris djacris changed the title Hide help from Nav Hide "help" from Nav Oct 1, 2015
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

1 participant