There is no word about submenus - are they possible with the current code?
Yes, possible and even pretty simple. I plan on writing some documentation about it. The best way is to use a macro. I'll post a code snippet here in a bit.
Thanks, that would be very nice :) i need it urgently for a customer project
Am 29.08.2014 um 16:08 schrieb Andy Miller [email protected]:
Yes, possible and even pretty simple. I plan on writing some documentation about it. The best way is to use a macro. I'll post a code snippet here in a bit.
—
Reply to this email directly or view it on GitHub.
Thanks .. but I'm still confused about the frontend styles for the dropdown at the antimatter theme (i am not a frontend developer). I wish the dropdown styles would be already included within the antimatter theme (a style which looks good and matches to the antimatter theme). I'm willing to donate such a solution, but I need it really quick :+1: Can anyone help here with the styling?
We're all busy working on other things at the moment. But I did add a cookbook entry in the documentation, and at the bottom are several great tutorials on how to style a dropdown menu that should work fine with just minimal tweaking:
The page has been remove, where could I find it now?
I think it got removed since dropdown menus are currently implemented in themes, Antimatter and other ones as well.
E.g. https://github.com/getgrav/grav-theme-antimatter#dropdown-menu
would be great could create custom menus like this
menu:
- text: menu
url: https://github.com/getgrav/grav
- icon: submenu here
url: http://twitter.com/getgrav
is there any way for achieve this? thanks
{% set current_parent = page.parent.parent.title %}
{% set options = { items: {'@page': '/' ~ current_parent|lower}} %}
{% set my_collection = page.collection(options) %}
<h3>{{ current_parent }}</h3>
<ul>
{% for p in my_collection %}
{% set current_page = (page.parent.title or p.menu) ? 'active' : '' %}
<li class="arc-submenu-list {% if (page.parent.title |lower) == (p.menu |lower) %} active {% endif %}">
<a href="{{ p.url }}">{{ p.menu }}</a>
</li>
{% endfor %}
</ul>
Most helpful comment
would be great could create custom menus like this
is there any way for achieve this? thanks