Hi.
I’d like to have in the menu one link with dropdown option, in which the child pages are showed.
I have non routable the parent page, however when I click on it, is loaded the first child page.
What can I do to resolve this?
Thanks.
Hi.
I’d like to have in the menu one link with dropdown option, in which the child pages are showed.
I have non routable the parent page, however when I click on it, is loaded the first child page.
What can I do to resolve this?
Thanks.
Hi @pamtbaau
I am modifying the Future Imperfect theme, redesigning it from scratch, according to the original HTML5Up.
I’ve added templates for simple pages and portfolio, as well as adding search functionality and drop-down menu. All this you can see in the following address:
http://future.juanvillen.es
What I want to achieve is what I already have, for example, on this web page: https://caslasgabias.com/, in which the Portfolio menu is drop-down but does not link to anything.
I hope this information can be of use to you.
Thank you
@pmoreno, Future does not support dropdown menus, so I guess you have created the dropdown yourself.
What you could do when creating the menu is:
href
attribute. It will then no longer respond to clicks.Hello @pamtbaau
In the end I got the result I wanted, with the following code:
{% macro loop(page) %}
{% for p in page.children.visible %}
{% set current_page = (p.active or p.activeChild) ? 'active' : '' %}
{% if p.children.visible.count > 0 %}
<li class="{{ current_page }}">
{% if p.routable == false %}
<a>
{% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
{{ p.menu }}
</a>
{% else %}
<a href="{{p.url}}">
{% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
{{ p.menu }}
</a>
{% endif %}
<ul>
{{ _self.loop(p) }}
</ul>
</li>
{% else %}
<li class="{{ current_page }}">
<a href="{{ p.url }}">
{% if p.header.icon %}<i class="fa fa-{{ p.header.icon }}"></i>{% endif %}
{{ p.menu }}
</a>
</li>
{% endif %}
{% endfor %}
{% endmacro %}
<ul class="navigation">
{% if theme_config.dropdown.enabled %}
{{ _self.loop(pages) }}
{% else %}
{% for page in pages.children.visible %}
{% set current_page = (page.active or page.activeChild) ? 'active' : '' %}
<li class="{{ current_page }}">
<a href="{{ page.url }}">
{% if page.header.icon %}<i class="fa fa-{{ page.header.icon }}"></i>{% endif %}
{{ page.menu }}
</a>
</li>
{% endfor %}
{% endif %}
{% for mitem in site.menu %}
<li>
<a href="{{ mitem.url }}">
{% if mitem.icon %}<i class="fa fa-{{ mitem.icon }}"></i>{% endif %}
{{ mitem.text }}
</a>
</li>
{% endfor %}
</ul>
In this way, you can decide whether a parent page is routable or not. You can see the final result in http://future.juanvillen.es/
Thanks for everything.