Created
September 29, 2020 07:21
-
-
Save iboved/a4cf63b8588b346ef770dcba1f02b861 to your computer and use it in GitHub Desktop.
Menu structure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if __SELF__.menuItems %} | |
<ul> | |
{% for item in __SELF__.menuItems if not item.viewBag.isHidden and item.viewBag.published_locales[activeLocale] %} | |
<li {{ item.isActive or item.isChildActive ? 'class="active"' }}> | |
{% if item.url %} | |
<a href="{{ item.url ?: '#' }}" {{ item.viewBag.isExternal ? 'target="_blank"' }}> | |
{{ item.viewBag.menu_title }} | |
</a> | |
{% else %} | |
{{ item.viewBag.menu_title }} | |
{% endif %} | |
{% if item.items %} | |
{% if item.items|length < 8 %} | |
<ul class="small"> | |
{% partial __SELF__ ~ '::items_small' items=item.items %} | |
</ul> | |
{% else %} | |
<ul class="big"> | |
{% partial __SELF__ ~ '::items_big' items=item.items %} | |
</ul> | |
{% endif %} | |
{% endif %} | |
</li> | |
{% endfor %} | |
</ul> | |
{% endif %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for item in items if not item.viewBag.isHidden and item.viewBag.published_locales[activeLocale] %} | |
<li {{ item.isActive or item.isChildActive ? 'class="active"' }}> | |
{% if item.url %} | |
<a href="{{ item.url }}" {{ item.viewBag.isExternal ? 'target="_blank"' }}> | |
{{ item.viewBag.menu_title }} | |
</a> | |
{% else %} | |
{{ item.viewBag.menu_title }} | |
{% endif %} | |
{% if item.items %} | |
{% partial __SELF__ ~ '::items_big' items=item.items %} | |
{% endif %} | |
</li> | |
{% endfor %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% for item in items if not item.viewBag.isHidden and item.viewBag.published_locales[activeLocale] %} | |
<li {{ item.isActive or item.isChildActive ? 'class="active"' }}> | |
{% if item.url %} | |
<a href="{{ item.url }}" {{ item.viewBag.isExternal ? 'target="_blank"' }}> | |
{{ item.viewBag.menu_title }} | |
</a> | |
{% else %} | |
{{ item.viewBag.menu_title }} | |
{% endif %} | |
{% if item.items %} | |
{% partial __SELF__ ~ '::items_small' items=item.items %} | |
{% endif %} | |
</li> | |
{% endfor %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment