Community & Support

Showing Menu Context of Another Page on an Orphan

Hi, all. I'm relatively new to Drupal, and have been pretty impressed with it so far.

I have a site that will have articles constantly added. We've got primary and secondary links (the secondary are the children of the active primary link). The articles are orphaned (not part of the primary link tree). I'd like to show a particular context's menu structures when on these articles.

I've looked quite a bit, and I haven't seen anyone that has done exactly this, though I'm sure it's possible. I've toyed with menu_set_item(), but I can't seem to find the right place to do it (and am unsure that this is the correct way, anyway).

Any help is appreciated!

Comments

Elaboration

To elaborate, I basically want the Primary and Secondary nav to look as if I was viewing a different node. Any easy hacks?

-------
Chris Steele
Vercadia Systems

-------
Chris Steele
Vercadia Systems

.

bump

-------
Chris Steele
Vercadia Systems

...

Rather than just writing "bump" you might want to explain this more clearly, for me, I dont clearly and simply understand what you want.

I can make an assumption, but I can't be sure.

Clarification

I have a node (many, actually) that is not defined in the menu structure for Primary or Secondary links.

When the page for that node is rendered, I'd like to be able to have the primary and secondary links appear as if the browser was actually pointed to another node (one that is in the primary links structure).

So, if this was my menu structure:

Primary1
Primary2
|-- Child1
|-- Child2
Primary3

and I had another item, Orphan, I'd like Orphan to display the primary and secondary links as if it was a child of Child1 (for example).

I've been researching this, and it appears that menu_item_set() might do something similar. Unfortunately, I don't know where/how to use it, and I may be wrong that it is related.

I'm sorry if I wasn't clear before, I hope this is better.

-------
Chris Steele
Vercadia Systems

-------
Chris Steele
Vercadia Systems

active trails?

Ok, so if I am clear now, if effect what you want is something like an "active trail" to appear - but, there is no actual active trail, but you want it to appear as though there is?

So you want Orphan (which bears some relationship to Child1) to trigger the display of the pseudo active trail - is that correct?

If I have this right, you can just add those "Orphan" nodes as menu items under the Child items - do this from the actual node edit screen rather than the Menu admin - if you do this the active trail will get triggered and all parent items will appear.

I have done this recently using only the Primary Menu, and where the "source" for Secondary menu is set to Primary menu (in menu settings).

Is that ballpark or am I way off track, maybe its too much hassle to add all your nodes as menu items?

Yes...

Indeed, this is how we have the secondary links set up (sourced from the primary links). And, I'd add them as children of the child nodes, if the site was a little less dynamic. We're doing a site for an online publisher, and they plan on adding lots of articles. Adding them to the menu structure (and ordering them that way) would be tedious and error prone for them, (and eventually unmanagable) so we did it another way.

We've got a key (the Nid, basically) of the virtual parent set on the article, so we know exactly what items we want in the active trail.

Any thoughts?

-------
Chris Steele
Vercadia Systems

-------
Chris Steele
Vercadia Systems

nobody click here