** Apologies if this has been sent twice; my mail has been up and down all day **
Howdy-ho,
I've got some subsidiary pages that all belong to a 'Subsidiary Links' menu. Something like:
SUBSIDIARY LINKS --About Us --Contact Us --Environmental Responsibility ----What we do ----How can you help ----Al Gore ------Al Gore! Al Gore! --Drive More SUVs --Nuke The Whales --Just Kidding
Anyway, you get the idea. Rather than show this entire menu on every subsidiary page (there will eventually be a *lot* of these pages, I'd like to just show the current branch and its parent (going down as many levels as required), hiding the parent's siblings:
Environmental Responsibility --What we do <<-- CURRENT PAGE --[snip]
Erm, how is this done? I've looked through the API and it's pretty incomprehensible (to me at least) how to do this programatically. I've also tried the menu_trim module, which goes one step too far and loses the parent link (the only way to get 'back' to another section). I tried fiddling with the menu_trim module (specifically, altering its trimming to start at the parent, not the current item), but that unleashed hell and brought out the parent of the Subsidiary Links menu. Argh!
Thanks for the help,
Rob
On Saturday 14 July 2007 00:29, Rob Wilmshurst wrote:
I've got some subsidiary pages that all belong to a 'Subsidiary Links' menu.
is this what you are trying to achieve? http://drupal.org/project/nice_menus
SUBSIDIARY LINKS --About Us --Contact Us --Environmental Responsibility ----What we do ----How can you help ----Al Gore ------Al Gore! Al Gore! --Drive More SUVs --Nuke The Whales --Just Kidding
Hmmm... I'd love to have a look at your site. you might be interested in this: http://minguo.info/usa/node/4 http://minguo.info/usa/node/13
But then, you are not from the U.S., are you?
"Rob Wilmshurst is a web developer living and working in Portsmouth, Englandland. [sic.]"
Augustin. http://minguo.info/
Sorry I've taken a couple of days to reply; perhaps posting last thing on a Friday was a bad idea :)
Augustin wrote:
is this what you are trying to achieve? http://drupal.org/project/nice_menus
Afraid not -- I was looking more to change the data and structure of menus, rather than their presentation. Should probably have mentioned I'm running Drupal 5, too - so nice menus is a no anyway (although it's probably time I put something back into Drupal by helping port it to v5!).
I actually ended up taking another look at menu_trim, then rewriting its menu_trimming features to what I needed. Basically, given the current 'level' in a menu, it traverses up the menu tree until it hits a specified cutoff point, returning the final parent and the menu tree from that point downwards (for theming elsewhere). Kinda handy, but needs work before I consider distributing it. Thanks though!
Hmmm... I'd love to have a look at your site. you might be interested in this: http://minguo.info/usa/node/4 http://minguo.info/usa/node/13 But then, you are not from the U.S., are you?
Indeed not! I watched An Inconvenient Truth the other day and Mr. Gore popped into my head -- I can assure you the real site is a little more serious (A fairly large adventure holiday operator)... Didn't vote though as I thought it might skew your results seeing as I know probably five or six of the names on your site (plus I'm not/can't vote in '08... being Johnny Foreigner and all). Nice idea though; I'll be keeping track.
Thanks for your time,
Rob
-- Rob Wilmshurst drupal@fifteenoclock.com