[Solved]Target _blank not working
[Solved]Target _blank not working
I'm running 1.10.3, and when I create a "redirect" link, set it to target _blank, it doesn't change the target, I have already changed my menu tpl from simple_navigation.tpl to accessible_simple_navigation.tpl as posted in a very old topic, but that did not work, any ideas?
Last edited by bittiez on Sun Apr 22, 2012 2:56 am, edited 1 time in total.
Re: Target _blank not working
In your menu template add this to the <a> tag:
Check the accessible_cssmenu template for an example on how to do it.
Code: Select all
{if $node->target ne ""} target="{$node->target}"{/if}
Re: Target _blank not working
At the Options Tab of the page there is an option to indicate the target. Have you set that to '_blank' ?
Maybe it helps if you post your menumanager template here so we can have a look at it.
Maybe it helps if you post your menumanager template here so we can have a look at it.
Re: Target _blank not working
Yes the blank option is set, here is the menu
Code: Select all
{* CSS classes used in this template:
.activeparent - The top level parent when a child is the active/current page
li.active0n h3 - n is the depth/level of the node. To style the active page for each level separately. The active page is not clickable.
.clearfix - Used for the unclickable h3 to use the entire width of the li, just like the anchors. See the Tools stylesheet in the default CMSMS installation.
li.sectionheader h3 - To style section header
li.separator - To style the ruler for the separator *}
{if $count > 0}
<ul>
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<ul>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</li></ul>" times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
<li class="menuactive menuparent"><a class="menuactive menuparent" href="{$node->url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}><dfn>{$node->hierarchy}:</dfn><span>{$node->menutext}</span></a>
{elseif $node->haschildren == true}
<li class="parent"><a class="parent" href="{$node->url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}><dfn>{$node->hierarchy}:</dfn><span>{$node->menutext}</span></a>
{elseif $node->current == true}
<li class="currentpage"><h3><dfn>Current page is {$node->hierarchy}:</dfn><span>{$node->menutext}</span></h3>
{elseif $node->type == 'sectionheader'}
<li class="sectionheader"><span>{$node->menutext}</span>
{elseif $node->type == 'separator'}
<li class="separator" style="list-style-type: none;"> <hr />
{else}
<li><a href="{$node->url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}{if $node->target ne ""} target="{$node->target}"{/if}><dfn>{$node->hierarchy}:</dfn><span>{$node->menutext}</span></a>
{/if}
{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}
Re: Target _blank not working
You aren't using that menu template, at least not in the top...
<div id="menuwrapper">
<ul id="primary-nav">
<div id="menuwrapper">
<ul id="primary-nav">
Re: Target _blank not working
Unless I'm missing something, that is indeed the one I am using, here is a SS
Re: Target _blank not working
Fixed it, in the website template(not the menu template) it had {menu loadprops=0 template='cssmenu.tpl'}
but I replaced with {menu} and all is well, thanks!
but I replaced with {menu} and all is well, thanks!