Note: This issue was copied from the GitHub issue queue at http://github.com/ghing/menu_site_map/issues#issue/6

When the "Display style" setting is set to "Nested Lists" and the "Move second-level items without entries to the end?" setting is checked in the module configuration, the output looks like this:

...
<li class="level-0 first">
<a title="" href="/">Resources For</a>
<ul class="container level-1">
<li class="level-1 first"> </li>
<li class="level-1"> </li>
<li class="level-1"> </li>
<a title="Resources for Librarians" href="/librarians">Librarians</a>
<a title="Resources for Researchers" href="/researchers">Researchers</a>
<a title="For Prospective Members" href="/members">Members</a>
</ul>
</li>
...

That is, it outputs the wrapper for the item when it shouldn't and only outputs the link at the end (and not the wrapper).

CommentFileSizeAuthor
#2 menu_site_map-605744.patch6.28 KBghing

Comments

mairav’s picture

With beta 3 the lists are being correctly nested, with or without the "Move second-level items without entries to the end" checked.

ghing’s picture

Status: Needs work » Patch (to be ported)
StatusFileSize
new6.28 KB

This patch fixes this issue. I had to end up passing the $leaf variable to the _theme_menu_site_map_item_container_open_lists/ theme_menu_site_map_item_container_close_lists functions and use it to determine whether the

  • tags should be output by _theme_menu_site_map_item_container_open_lists/ theme_menu_site_map_item_container_close_lists or by _theme_menu_site_map_item_container_item_lists. The logic for all of this stuff is a little messy, but I'm not sure if it's worth refactoring unless people report more issues. It's challenging to support both my default style of output (like that used at http://www.crl.edu/sitemap) and the nested list style output that is more like the one generated by the default Site Map module behavior.

    I also updated the stylesheet to make the modifications to the list styles only happen when the "default" output style is selected. I'll leave it up to themers to make changes if they want the nested list style output to look different.

  • ghing’s picture

    Status: Patch (to be ported) » Fixed

    This bug has been fixed in the 6.x-1.0-beta4 release.

    Status: Fixed » Closed (fixed)

    Automatically closed -- issue fixed for 2 weeks with no activity.