[Solved] extra </li> in menu
Posted: Fri Jun 04, 2010 1:04 pm
Hi all, i'm using template "minimal_menu.tpl" (build in cms) to show main menu. Hier is source code of this template menu:
{* CSS classes used in this template:
.currentpage - The active/current page
.bullet_sectionheader - To style section header
hr.separator - To style the ruler for the separator *}
{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}
{elseif $node->index > 0}
{/if}
{if ($node->extra1 == 'restricted' and $ccuser->memberof('pracownicy')) or $node->extra1=='' }
{if $node->current == true}
url}" class="currentpage"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext}
{elseif $node->parent == true && $node->depth == 1 and $node->type != 'sectionheader' and $node->type != 'separator'}
url}" class="activeparent"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext}
{elseif $node->type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
{else}
url}"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext}
{/if}
{/if} {*zamkniecie instrukcji warunkowej dla pola extra1*}
{/foreach}
{repeat string="" times=$node->depth-1}
{/if}
I didn't change nothing, I added only these lines for hide resctricted page:
{if ($node->extra1 == 'restricted' and $ccuser->memberof('pracownicy')) or $node->extra1=='' }
and {/if} {*zamkniecie instrukcji warunkowej dla pola extra1*}.
On left sidebar (in page template) I call menu template like this:
{menu number_of_levels='3' start_level='2' template='minimal_menu.tpl'}
It work's fine, I see all menu, submenu etc. But when I validate my site I have one error with extra tag . For example it's looks like below:
blablabla1
blablabla2
blablabla3
/* extra added tag in this place */
I thing it's problem with template "minimal_menu.tpl", but I'm not expert in smarty, php etc. and I dont know witch line in source code of template is invalid.
Anyone can help?
Regards,
Marek A.
{* CSS classes used in this template:
.currentpage - The active/current page
.bullet_sectionheader - To style section header
hr.separator - To style the ruler for the separator *}
{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}
{elseif $node->index > 0}
{/if}
{if ($node->extra1 == 'restricted' and $ccuser->memberof('pracownicy')) or $node->extra1=='' }
{if $node->current == true}
url}" class="currentpage"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext}
{elseif $node->parent == true && $node->depth == 1 and $node->type != 'sectionheader' and $node->type != 'separator'}
url}" class="activeparent"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext}
{elseif $node->type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
{else}
url}"{if $node->target ne ""} target="{$node->target}"{/if}> {$node->menutext}
{/if}
{/if} {*zamkniecie instrukcji warunkowej dla pola extra1*}
{/foreach}
{repeat string="" times=$node->depth-1}
{/if}
I didn't change nothing, I added only these lines for hide resctricted page:
{if ($node->extra1 == 'restricted' and $ccuser->memberof('pracownicy')) or $node->extra1=='' }
and {/if} {*zamkniecie instrukcji warunkowej dla pola extra1*}.
On left sidebar (in page template) I call menu template like this:
{menu number_of_levels='3' start_level='2' template='minimal_menu.tpl'}
It work's fine, I see all menu, submenu etc. But when I validate my site I have one error with extra tag . For example it's looks like below:
blablabla1
blablabla2
blablabla3
/* extra added tag in this place */
I thing it's problem with template "minimal_menu.tpl", but I'm not expert in smarty, php etc. and I dont know witch line in source code of template is invalid.
Anyone can help?
Regards,
Marek A.