[solved] target|default:'_self don't work
Posted: Sat Sep 25, 2010 8:37 pm
Hello all,
I've something wrong with my top menu, each page are opened with the property target="_blank" ! So, I've changed the target option of each page on "_self" but It didn't work.
I've changed the link in the template of my top menu
from:
url}" class="activeparent"{if $node->target ne ""} [glow=red,2,300]target="{$node->target}[/glow]"{/if}>extra1 }"> {$node->menutext}
To:
url}" class="activeparent"{if $node->target ne ""} [glow=red,2,300]target="{$node->target|default:'_self'}[/glow]"{/if}>extra1 }"> {$node->menutext}
So, my menu top template became :
{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->parent == true && $node->depth == 1 and $node->type != 'sectionheader' and $node->type != 'separator'}
url}" class="activeparent"
{if $node->target ne ""} target="{$node->target|default:'_self'}"{/if}>extra1 }"> {$node->menutext}
{elseif $node->type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
{else}
extra1 }">url}"{if $node->target ne ""} target="{$node->target|default:'_self'}"{/if} class="fadeThis {$node->extra1 }">extra1 }"> {$node->menutext}
{/if}
{/foreach}
{repeat string="" times=$node->depth-1}
{/if}
--------------------------------------------------------------------
Nothing I tried works.
I'm using last release of CMSMS.
Thanks a lot by advance,
Eric
I've something wrong with my top menu, each page are opened with the property target="_blank" ! So, I've changed the target option of each page on "_self" but It didn't work.
I've changed the link in the template of my top menu
from:
url}" class="activeparent"{if $node->target ne ""} [glow=red,2,300]target="{$node->target}[/glow]"{/if}>extra1 }"> {$node->menutext}
To:
url}" class="activeparent"{if $node->target ne ""} [glow=red,2,300]target="{$node->target|default:'_self'}[/glow]"{/if}>extra1 }"> {$node->menutext}
So, my menu top template became :
{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->parent == true && $node->depth == 1 and $node->type != 'sectionheader' and $node->type != 'separator'}
url}" class="activeparent"
{if $node->target ne ""} target="{$node->target|default:'_self'}"{/if}>extra1 }"> {$node->menutext}
{elseif $node->type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
{else}
extra1 }">url}"{if $node->target ne ""} target="{$node->target|default:'_self'}"{/if} class="fadeThis {$node->extra1 }">extra1 }"> {$node->menutext}
{/if}
{/foreach}
{repeat string="" times=$node->depth-1}
{/if}
--------------------------------------------------------------------
Nothing I tried works.
I'm using last release of CMSMS.
Thanks a lot by advance,
Eric