1

I have a site with 2 sections of content, A and B. I have a node, 'Z' that needs to appear in each area. I also have a different menu for each area, e.g.

Section 'A'
link 1
link 2
link Z -> should show menu 'A'

Section 'B'
link 3
link 4
link Z -> should show menu 'B'

I am using context to load the correct menu block, depending on which section a user is viewing (each node is either in an Organic Group, or the Group has a taxonomy term identifying the section which is the ultimate source of the section).

How can I display the content in node Z and also show the correct menu?

I've tried Node Hierarchy and it doesn't appear to be able to do what I'm looking for (it's also left some menu entries I can't delete).

Update: taking a step back and looking fit aaa simple solution, I think that the patch here will allow me to append a simple query string to my URL and thus avoid having the appearance of duplicated content. Assuming of course that I can add the query string to the menu item.

1

I was able to create an acceptable solution by adding a query string to my menu links and adding an additional test to my PHP conditions. Now I've got something like:

return $_SERVER["QUERY_STRING"] == 's=pt';

and I get the context I'm looking for. The actual implementation is a little more complicated (due to having taxonomy also defining context, but needing to override it when a query string is passed so as to avoid ending up displaying both menus) but that should give you the idea in case anyone else is looking to solve the same problem.

I'd like to see the patch in http://drupal.org/node/904416 make it's way into the official context release. For me, maintaining a custom PHP condition is much easier than remembering I need to patch a module every time I update it if it doesn't get in there.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.