← Back to Multipurpose Theme with PAGE BUILDER - Success Support
mjauvin
Hello, I have a suggestion for improvements to partials/site/nav.htm:
--- partials/site/nav.htm.dist 2019-01-24 10:25:30.986185011 -0500
+++ partials/site/nav.htm 2019-01-24 10:26:04.071278498 -0500
@@ -8,7 +8,7 @@
{% import _self as nav %}
{% macro render_menu(items) %}
{% import _self as nav %}
-{% for item in items %}
+{% for item in items if not item.viewBag.isHidden %}
{% if item.items %}
<li role="presentation" class="nav-item dropdown {{ item.isActive ? 'active' }} {{ item.isChildActive ? 'active' }}">
<a href="{{ item.url }}" class="nav-link dropdown-toggle" data-toggle="dropdown" aria-expanded="false">{{ item.title }}</a>
@@ -55,4 +55,4 @@
{% endif %}
</div>
</div>
-</nav>
\ No newline at end of file
+</nav>
This would hide a menu item if it has been marked hidden in the static page menu editor.
Last updated
Charis
marc.jauvin24240 said:
Hello, I have a suggestion for improvements to partials/site/nav.htm:
--- partials/site/nav.htm.dist 2019-01-24 10:25:30.986185011 -0500 +++ partials/site/nav.htm 2019-01-24 10:26:04.071278498 -0500 @@ -8,7 +8,7 @@ {% import _self as nav %} {% macro render_menu(items) %} {% import _self as nav %} -{% for item in items %} +{% for item in items if not item.viewBag.isHidden %} {% if item.items %} <li role="presentation" class="nav-item dropdown {{ item.isActive ? 'active' }} {{ item.isChildActive ? 'active' }}"> <a href="{{ item.url }}" class="nav-link dropdown-toggle" data-toggle="dropdown" aria-expanded="false">{{ item.title }}</a> @@ -55,4 +55,4 @@ {% endif %} </div> </div> -</nav> \ No newline at end of file +</nav>
This would hide a menu item if it has been marked hidden in the static page menu editor.
Hello Jauvin !!
Why not? This is a great suggestion. I will implement it on next update.
1-2 of 2