I stumbled upon a bug. If a Menu.Entry has no further submenues (but siblings) it is not shown. The 'sanity check' around line 255 (// $Id: submenutree.module,v 1.4 2008/05/26 05:18:12 bengtan Exp $ ) only checks for my_tree, but not for parent_tree.
This is a fixed version, that checks the proper variables:
// Sanity check that we did find something
if( $my_tree || $parent_tree )
{
if ( $my_tree && $node->submenutree_enable)
{
_submenutree_menutree_view($node, 'submenutree', $my_tree);
}
if ( $parent_tree && $node->siblingmenutree_enable)
{
_submenutree_menutree_view($node, 'siblingmenutree', $parent_tree);
}
}
Sorry for no correct .patch file, i'm in a hurry ^^
Comments
Comment #1
bengtan commentedHi,
Sorry for the late reply. I've been occupied with other things and this one slipped through the cracks a bit. I suspect you're right, and I'll look into it over the next day or so.
Beng
Comment #2
bengtan commentedHi,
Yes, you can correct. It's been confirmed and corrected.
I have commited a fix to CVS. My fix isn't quite the same as yours, but it's similar enough that you can continue to use yours with no problem.
If you curious, you can see the change here:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/submenutree...
I'm not planning to make a separate release just for this bug, unless it's also affecting other people.
Thanks.
If there are any other issues, please let me know.
Comment #3
ju commentedHi, thanks for greate module!
But I have problem,
after updating to version 1.2 sibling items appeared, but there are no parent items.
I have Primary links, the structure like this:
I use Siblingmenu in block.
For all items that is ok,
but for item 1.1.1 and item 1.1.2 in block I see only siblings, without parents.
Maybe it is ok, but at site http://www.caignwebs.com.au/content (this is link from Sites which use Submenu Tree) I seen menu with parents, and I need the same.
Julia
Comment #4
bengtan commentedHi,
@ju: This is a separate issue from the original post. If you want to follow this up, please post a new issue instead of replying to this comment.
Siblingmenu displays just the siblings, not the parents. That is by design.
ie. If you view the sibling menu for 1.1.1, you will only see links to 1.1.1 and 1.1.2, and there is no link to 1.1.
What you are probably after can be done, but might need some code or themeing customisation. If it helps, have a look at #268327: Documentation submenutree.
If you still have questions, please post them in a new issue.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.