Custom class on submenu ul

18 views
Skip to first unread message

joelc...@gmail.com

unread,
Jul 4, 2018, 9:41:11 AM7/4/18
to simple-navigation
Hi!

I have the following structure on my menu

    primary.item :dashboard, 'Dashboard', root_path
    primary
.item :expenses, 'Expenses', expenses_path
    primary
.item :reports, 'Reports', reports_path
    primary
.item :actions_group, 'Options', 'javascript:;'  do |actions|
      actions
.item :group, "Group", group_path do |group_actions|
       
group_actions.item :group_add, "Add", new_group_path
       
group_actions.item :group_list, "List", groups_path
     
end
   
end



I'm using a custom renderer to get the html the way I want it.
How can I set a class on all submenu ul elements?

Something like

<ul>
   
<li>Options
     
<ul class="sub-menu">
         
<li><a href="path">Add</a></li>
         
<li><a href="path">List</a></li>
     
</ul>
   
</li>
</ul>


Thank you!

Andi Schacke

unread,
Jul 5, 2018, 10:41:15 AM7/5/18
to simple-n...@googlegroups.com
Hi Joel, 

I would suggest that you check out the src code of the existing renderers and I guess that you will find a couple of examples of how to do this.


Cheers
Andi

--
You received this message because you are subscribed to the Google Groups "simple-navigation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to simple-navigat...@googlegroups.com.
To post to this group, send email to simple-n...@googlegroups.com.
Visit this group at https://groups.google.com/group/simple-navigation.
For more options, visit https://groups.google.com/d/optout.

joelc...@gmail.com

unread,
Jul 16, 2018, 11:57:48 AM7/16/18
to simple-navigation
Can't get my head around it, but thanks anyway.
Reply all
Reply to author
Forward
0 new messages