I absolutely adore the control this module gives over display of child menu items on each node.
I would like to see a second module that would have this same control over the display of brother/sister items to the node. I suggest this as a separate module because I could see using two blocks on a page, one for brothers/sisters, one for children, to really help in navigation.
The only other item I could suggest is greater control over the block title, but being a non-coder, I have no idea how hard that would be.
Thanks again for contributing such a great module.
Comments
Comment #1
bengtan commentedThanks for your feedback and encouragement.
I think displaying sibling nodes is a good idea. Unfortunately, I'm busy with some other matters at the moment, but hopefully I'll be able to give it some attention in a week or so's time. Having done child nodes, doing the same with sibling nodes isn't that much more different.
You can override the block title from the block's configure link. See
http://yoursite.com/admin/build/block
or possibly
http://yoursite.com/admin/build/block/configure/submenutree/0
Although if you override it in this manner, the block title won't change with different nodes. Does that help with what you want?
Comment #2
DrupalBone commentedI sincerely apologize for not getting back to you sooner. Thank you for your willingness to pursue this request for a sibling menu.
I consider the menu title not a big issue, but it would be interesting to have some direct control over the menu title per node. For example, if I have a child menu of individual states, submenutree would put the parent menu item as the title, in this example I'd say "USA". I would like to have the control of the title to say "USA Navigation" or "Explore further into the US". But this would be specific to the node page, just as the submenutree is controlled on a per node basis.
Of course that would probably be a monster to work out in comparison to a sibling menu module or something like that.
Anyways, thanks again, I'm heading to my test site to submenutree-ize some more nodes right now.
Comment #3
bengtan commentedYou know, I think you've got a point there. At the moment, I've derived the block title from the node title. There's an argument that I should be deriving from the menu title instead. Let me get back to you on this.
Comment #4
bengtan commentedI've made a 0.4 release with configurable titles and sibling menu tree functionality. Please have a look and give it a try, but make sure you read the upgrade instructions though.
Comment #5
DrupalBone commentedSuperb!!! I will check that out ASAP!
Comment #6
DrupalBone commentedWow! This thing rocks hard now! I'll be sure to let you know when my site goes live so you can see it in action.
I send many thanks, and hope this is put into drupal core someday... talk about essential!
My only extra thought now is whether there is a way to exclude the node you are on from the siblingmenu list, I suppose as a configurable option.
But regardless of whether that is possible or not, the module as is gets my highest praise... thank you.
Comment #7
bengtan commentedThanks, and you're welcome.
>> My only extra thought now is whether there is a way to exclude the node you are
>> on from the siblingmenu list, I suppose as a configurable option.
Uh, I thought about this, and I decided ... no. I think it's safer not to attempt this.
When displaying as a menu, I can only exclude the current node by removing it from the Drupal menu hierarchy, and I'm not messing around with that. Hence, if I can't remove it when displaying as a menu, I shouldn't remove it when displaying in other ways (ie. teaser, full text).
If you really really need to exclude the current node, you can override the themeable functions and do it there, if you think it's worth the effort.
Comment #8
DrupalBone commentedThat's all good. Do you think it would be a difficult thing to override by a themeable function? I'm embarrassed by how little I know about the theming system altogether, at best I'm a guy who writes HTML/CSS by hand. I don't know anything about "if" statements.
Comment #9
bengtan commentedGenerally, overriding a themeable function isn't hard, but you do have to know php and Drupal theming, and know them well.
For this scenario, it's a bit more complicated as well, because you'll have to sort through a list of nodes to find the main one that's being displayed, and then exclude it.
So, my short answer is ... don't try it unless you really know what you're doing. The slightly longer answer is ... to go and learn php and Drupal coding, or find someone to do it.
Comment #10
DrupalBone commentedJust as a follow-up, I found this script in another forum post... that I deleted an undesired part from... and by putting it into my theme's template.php it doesn't display the menu item of the current node, making the siblingmenutree truly rock!
The only problem I'm having is that even though it removes the menu item, it doesn't remove the li code that would go around it.
<li class="leaf"></li>The only problem with this is that it shows a bullet for this entry even though the menu item isn't shown. I want to have the bullets on the menu item list, so removing all bullets won't work. I'll be looking into this.
Here is the code to remove the menu item though:
So now I'm a good way there... just need to figure out how to disable that li and It'll be smoking.
Comment #11
DrupalBone commentedOh yeah... this is the original link to the code I modified:
http://drupal.org/node/171529
And here was his code
In case anyone visiting this thread is interested.
Comment #12
bengtan commentedIt's purely coincidental that I was doing some theming recently which also had to handle the current node/page specially in the menus. I've modified it to exclude the current node/page.
You might find this more useful. Replace that script fragment you found with this one and see how you go.
Comment #13
DrupalBone commentedI just gave that code a shot but the page wasn't removed from the siblingmenu list. Its color was changed to black though. I'm using zen as my theme, so maybe that is part of it?Revised... scratch that, I used my brain for a second and figured it out. Anyone using this be sure to change "yourtheme" to your theme name.
But wow bengtan... this is a complete solution now if there ever was one. I am giving you my highest appreciation once again.
Comment #14
DrupalBone commentedI just realized that this causes a bit of a problem for me.
In my drupal install I have two main menus... my user menu which includes "my account, administer, create content" and the other menu is my site navigation, like my example above "USA, states..."
My problem is that whereas I would like for the items to be removed from the site navigation list, I would like the normal tree structure to work on the user menus.
So my question is, is there a way to make this template script/function target only one menu tree and not the other?
Comment #15
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.