1
Francesca
Subcategories in Sitemap
  • 2006/10/15 10:34

  • Francesca

  • Just popping in

  • Posts: 9

  • Since: 2006/5/14


Hello, I installed Sitemap on XOOPS 2.0.15 and I use this HTML code to display the map with nested lists:
<{if $module.name}>
    <
h2><a class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/"><{$module.name}></a></h2>
       <
ul>
    <{foreach 
item=parent from=$module.parent}>
      <
li><a class="menuSub" href="<{$xoops_url}>/modules/<{$module.directory}>/<{$parent.url}>"><{$parent.title}></a>
      <{if 
$show_subcategoris}>
      <
ul>
      <{foreach 
item=child from=$parent.child}>
        <
li><a class="menuSub" href="<{$xoops_url}>/modules/<{$module.directory}>/<{$child.url}>"><{$child.title}></a></li>
      <{/foreach}>
      </
ul></li>
      <{/if}>
But, if there are no subcategories I end up having empty sub-lists.
What can I do about that?
I'd need to show the nested <ul> only where there actually are subcategories..

Thank you in advance.