How do you remove the Top Nav menu for the home page? I want to move the content slider up and just publish main 'action' buttons. Join Volunteer Donate underneath the content slider.
And can someone show me what 'module' positions are available on the Victory Again template. I'm used to using Joomla and can publish 'modules - snippets of content in many different positions on any page. Can you do this in a NationBuilder stock theme template.
The top nav is displayed on each page because the Layout.html file in the website theme, which controls what every page looks like, includes the following include tag:
{% include "nav" %}
Removing this would indeed remove it from every page, but if you would like to remove it from JUST the homepage, you could surround it with a liquid conditional statement instead of removing it completely. Like this:
{% unless page.is_homepage? == true %}{% include "nav" %}{% endunless %}
This will show the Top Nav on the page UNLESS the page you are viewing is the homepage. Similarly, the "IF" liquid logic works as well:
{% if page.is_homepage? == false %}{% include "nav" %}{% endif %}
Lastly, it is worth noting that the "page.is_homepage?" variable is useful in this instance but would not help if we were trying to hide an element from a different page on your site. In that scenario, you could use page.slug. For example:
{% if page.slug == "donate" %}{% else %}{% include "nav" %}{% endif %}
Showing 3 reactions
Sign in with
Did you finally manage to unpublish the nav bar only for the home page ?
I am trying to do this right now, but I can only have it on all pages or on none if I change the layout.html file.
Thanks!
Inside will be a line:
{% include "nav" %}Removing that line will remove the nav bar completely from all pages.