Each group their own menustructure
held69 - November 7, 2008 - 12:30
| Project: | OG Menu |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Description
For the last few days i have been going back and forth how to create the possibility for groups(admin) to create their own menu structure.
When i found this module i was gladly to read that it has the possibility.
But still i cant get to a well built structure that is the right solution for me.
Maybe someone here has the experience setting such thing up.
Until now i used a combination of CCK, CCK link, Views and ofcourse OG block visibility.
Could maybe someone give me a basic order of steps?
Thank in advance
cheers

#1
I'll explain what i want to achieve and what i did already to make things more clear.
1. Users should be able to creat a "group" - i installed OG module
2. Users should be able to create a "page"
3. Users should be able to create a link from the "group"/homepage to a "page"
- with CCK and CCK link i created this possibility.
3.These links should only be displayed as a (menu-navigation) block, on the "group"pages
of one specific group.
- with views i created a block that displays the links made in the CCK/link field.
- with OG block visibility i checked the group, for display in that specific group.
Now the links created by all te groups will be displayed on this (menu navigation)block.
Finally this block will be displayed in one group.
This is not what i want.
I only want the links displayed in the block which were created by the initiator of the group.
So: Group A has a menu block with only links to pages related to that group A
During navigation within the group-content this menu block stays displayed
Group B has a menu block with only links to pages related to that group B.
During navigation within the group-content this menu block stays displayed etc.
I have been searching but i havent ran into something that was very clear to me.
I'm not much of coder.
The stuff that i found was:
http://drupal.org/node/174563
http://drupal.org/node/213448
http://drupal.org/node/176927
http://drupal.org/node/123003
I probably went into a wrong direction creating a solution for this and really could use some pointers here.
Or......is this impossible in Drupal at this moment?
#2
I will not have the time to look at this , can anyone help here ?
#3
This has not been ported to 6.x yet, mostly because I'm hoping for a co-maintainer before I upload it to drupal.org but see Og Menus. Note that this is not the same as the Og Menus project which currently exists and which someone needs to take over (probably me and a co-maintainer since I'm SO busy).
http://davidwees.com/myblog/node/302
Dave
#4
dwees and paul thank you! Have been searching and reading so many posts over here.
After reading the description this finally could be what i'm looking for.
I will check it out and report here.
#5
Just installed the og_module menu, but its for drupal 5.
Is there any chance there will be a drupal 6 version of the og_module?
#6
Aaah bummer.
Well eventually I'll need the module for a Drupal 5 site that will need upgrading to Drupal 6, but I doubt it will happen anytime soon.
However this module is written for OG version 5.x-7.3 which probably does not have a significantly different API than the 6.x version. If you use the Deadwood module, you might be able to do 90% of the conversion pretty easily yourself. The tricky bit will be verifying that this module will still interact well with the Drupal 6.x Menu module, which I know had major overhauls.
You could consider hiring a developer to do the upgrade, and it might be nice if someone would take over maintaining the Og Menu module proper.
Anyway, this issue queue I think now belongs in the Og Menus queue, unless we can find a way to resolve it using the Og Visibility Module.
Dave
#7
thanks for your time and info.
In your earlier post i read your very busy,
"You could consider hiring a developer to do the upgrade,"
would you be interested in doing the upgrade?
You mentioned the og visibility block, do you think this module could have the functionality we are talking about?
Byron
#8
Well one problem I have with accepting this offer is that I don't know how much the Menu module API has changed, so I don't know how difficult the upgrade is. I'd have to do some research before I could do this.
It is certainly true that I couldn't possibly begin this project in the next two weeks because of the work I am putting into my Masters degree right now (I have a course which basically finishes in 2 weeks).
Dave
#9
Starting within two weeks is soon enough for me.
I'm very curious though how much it would take you to do the upgrade.
I understand you should do some research first.
Is it possible to make a slight indication of time without doing research.
1 week/2 weeks or 1month/2monts.
I have never been involved in a upgrade of a module so i dont have a clue.
Byron
#10
It depends a lot on the changes. My module only interacts with a couple of menu forms, but these forms are much more complicated than they used to be. However there is some light at the end of the tunnel, the new menu forms are much more specific to a particular menu than the old forms, so this may not be too difficult.
I anticipate it would take about 1 - 2 weeks (working part time) to do the upgrade which may end up breaking down into 3-4 hours of research, 3-4 hours of coding, 1 hour of testing the code (even in December I'll still be working full time hence the extended amount of time to finish this up).
I don't know how to create the automated simple tests though, so I'll just be testing through the UI.
Dave
#11
Looking at the hours that would take you to realize the update i doubt that this project stays within the reach of my budget.
With all respect ofcourse. :)
By the way i noticed that on groups.drupal.org each group page has a sort of little navigation structure in their mission statement block.
Do you how this is done? Is it with og panels only?
#12
Yeah I think it is. Those aren't really menus, they are just custom views. This could also work for you though, but would be slightly trickier to implement (requires training your group members).
Add a taxonomy field to pages, 2 word vocabulary with choice of either "Include in Group Menu" or "Do not include in group menu". Add a CCK field called "Weight" with values from like -20 to 20 as an integer select. You then create a view called "Group Menu" which you include in a block. This view is a list view of of the titles of the nodes in the current group which have the correctly selected taxonomy term, sorted by the cck weight field ascending, then title ascending.
When people create an item they can either include it in the menu or not, and they can position it by using the weight, as long as you explain how it works (maybe in the help text for your group?).
I'm not totally sure about the "current group bit" but I have created Views with the current group only before in D5 pretty easily, so this should be possible in D6. You may just have to set up the view to "do not display" when it has no values so that your menu disappears on non-group pages.
Dave
#13
That's great! Thanks very much Dave, for your clear tutorial.
I'll sure give it a trie and report some back here.
Byron
#14
It took a while some things came in between but i almost got it.
The only thing that i dont seem to get right is the post in current group.
How can i get this configured right? Do you remember how you did this in D5?
#15
Yeah, OG provided a function that kept track of the context for me, I just used it in my hook_block implementation to only display the block when the group post matched the menu block. I think the name of the function was og_is_group_post() or something like that.
Dave
#16
Yesss i think i got it now.
I found this thread http://drupal.org/node/175505 in which the function you just mentioned was described.
Because i use views in drupal 6, this did the trick:
"use Views to create a page or block.
In filter section user "OG: Posts in current group".
So no need to use those code."
Now some testing with the taxonomy fields, and i'm there.
Thanks again...
I'll report later...
#17
Finally all is tested. Most of it is good but still one thing i cant figure out.
I think the problem is caused by the post in current group filter.
I'll explain:
I created a block. Created a link in it (rowstyle=fields).Filtered it on Post in current group.
Then i created a page (display).Inserted post-date and author field.Filter on pages.Path is mysite.com/?q=pages
I want all pages to be shown in the current group.
Now when i check my page display as a live preview its all good.
But when i view as a test user and click the link in the block as created above that leads me to to page:
The display of the page is not as i configured it. Just as the path that is different as well: mysite.com/first posted page in group
I tested some more to discover that changing values in my page display has no effect at all, only in the live preview it does.
I must be overlooking something but cannot find the cause yet....