[Solved]Target _blank not working

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
bittiez
New Member
New Member
Posts: 5
Joined: Fri Apr 20, 2012 6:53 pm

[Solved]Target _blank not working

Post by bittiez »

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.
Mieszko
Forum Members
Forum Members
Posts: 59
Joined: Fri Mar 04, 2011 2:40 pm

Re: Target _blank not working

Post by Mieszko »

In your menu template add this to the <a> tag:

Code: Select all

{if $node->target ne ""} target="{$node->target}"{/if}
Check the accessible_cssmenu template for an example on how to do it.
bittiez
New Member
New Member
Posts: 5
Joined: Fri Apr 20, 2012 6:53 pm

Re: Target _blank not working

Post by bittiez »

Still no good :S

http://cubiceffect.com is the website(Not trying to advertise here)
Mieszko
Forum Members
Forum Members
Posts: 59
Joined: Fri Mar 04, 2011 2:40 pm

Re: Target _blank not working

Post by Mieszko »

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.
bittiez
New Member
New Member
Posts: 5
Joined: Fri Apr 20, 2012 6:53 pm

Re: Target _blank not working

Post by bittiez »

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}
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Target _blank not working

Post by Dr.CSS »

You aren't using that menu template, at least not in the top...

<div id="menuwrapper">
<ul id="primary-nav">
bittiez
New Member
New Member
Posts: 5
Joined: Fri Apr 20, 2012 6:53 pm

Re: Target _blank not working

Post by bittiez »

Unless I'm missing something, that is indeed the one I am using, here is a SS
Attachments
Untitled.png
bittiez
New Member
New Member
Posts: 5
Joined: Fri Apr 20, 2012 6:53 pm

Re: Target _blank not working

Post by bittiez »

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!
Post Reply

Return to “CMSMS Core”