I use SiteMenu's _sitemenu_overview function to build the item tree for my Dynamic menu (UDM). I have noticed that the function returns '</ul>' for vocabularies without any terms. No big deal, but it would help if it would return NULL.

Comments

kbahey’s picture

Can you make a patch?

I am willing to include such a change, provided it does not break anything in sitemenu itself.

osherl’s picture

I think it's this line should return NULL in the ["content"] array element:

$boxes[$n]["content"] = theme('sitemenu_render_outline', $tree_nodes, $vocab_type);

The logic in theme_sitemenu_render_outline is too complicated for me to handle. I you can make this change it would be greatly appreciated.