Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submenus possible? #39

Closed
visioncode opened this issue Aug 29, 2014 · 9 comments
Closed

Submenus possible? #39

visioncode opened this issue Aug 29, 2014 · 9 comments
Labels

Comments

@visioncode
Copy link

There is no word about submenus - are they possible with the current code?

@rhukster
Copy link
Member

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.

@visioncode
Copy link
Author

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.

@rhukster
Copy link
Member

@visioncode
Copy link
Author

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 👍 Can anyone help here with the styling?

@rhukster
Copy link
Member

rhukster commented Sep 2, 2014

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:

http://learn.getgrav.org/cookbook/dropdown-menu

@rhukster rhukster closed this as completed Sep 6, 2014
@1dotd4
Copy link

1dotd4 commented Mar 12, 2016

The page has been remove, where could I find it now?

@flaviocopes
Copy link
Contributor

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

@cocodrino
Copy link

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

@co0kie
Copy link

co0kie commented Sep 28, 2017

{% 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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants