[support] Guidance on architecting nested and contextual OG menus

Info Razor inforazor at gmail.com
Wed Oct 16 21:05:25 UTC 2013


Hi there Drupal-pals,

[Sorry resending because I am not sure the first email went correctly]

Two part question.

First aside from the OG_menu and OG menu default links, is there any other (smart) way to create automatic menu options based on the currently active menu? When I look at groups.drupal.org (http://groups.drupal.org) I see paths like:
https://groups.drupal.org/node/add/event?gids[]=3002

Where you have a path to add a node, its type and then a variable which references the current group.

Should I just make these as default links? If so, do I add the current GID into the default menu link list as text?

I need a similar format like on groups.drupal.org (http://groups.drupal.org) where each new group gets very standard, repeated, menu links: a group Forum, group Blog posts, and group related content (of specific types).

In a nut shell my question is: How do I set up a group-contextual menu like on groups.drupal.org (http://groups.drupal.org)?

=--=-=

Second question, once I have figured out the first, I will need to inject the sub-menu of the group between a listing of all groups.

So if the groups are listed as such:

<ul>
<li><a href="linkpath 1">group name1</a></il>
<li><a href="linkpath 2">group name2</a></il>
<ul>

I will need the sub-menus to be nested inside of the menu output like such:

<ul>
<li><a href="linkpath 1" class="active active-trail">group name1</a>
<ul>
<li><a href="node/add/event?gids[]=3002">Add event</a></li>
//more links go here
</ul>
</il>
<li><a href="linkpath 2">group name2</a></il>
<ul>


Is my best approach to just use template.php and catch the menu tree rendering and to then inject the group-menu inside of the main menu (main menu = the menu where all the groups are put inside of)?

Adding custom PHP to the template.php file is the way I am thinking I would approach this problem, but maybe there is an easier way?

Thanks!!

-- 
Sebastian


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/support/attachments/20131016/13a33a0b/attachment.html 


More information about the support mailing list