CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#4147] Target: _blank not working

avatar
Created By: jeremy baker (coasterfrj)
Date Submitted: Mon Oct 05 19:04:41 -0400 2009

Assigned To:
Version: 1.6.5
CMSMS Version: None
Severity: Critical
Resolution: Invalid
State: Closed
Summary:
Target: _blank not working
Detailed Description:
Pages set to Target: _blank do not open in a new tab or window, the page just
loads over existing page


History

Comments
avatar
Date: 2009-10-06 08:16
Posted By: Rolf (rolf1)

Hi

When you are talking about: Pages set to Target: _blank
Do you mean the internal and external page links?
They are both working for me... (1.6.6)

Or do you mean something else?

®
      
avatar
Date: 2009-10-06 08:36
Posted By: jeremy baker (coasterfrj)

When I Create new content pages. And set the _blank when I click the link in the
navigation it does not open in a new window.  I'm using the left simple + 1
colmn layout and the simple verticle nav
      
avatar
Date: 2009-10-06 09:18
Posted By: Rolf (rolf1)

HiJeremy
I was able to reproduced it! You were right, It is a bug.
In the simple_navigation menu template is this missing twice in the <a href... :
{if $node->target}target="{$node->target}" {/if}

This works:
{* 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}"><span>{$node->menutext}</span></a>

{elseif $node->haschildren == true and $node->type != 'sectionheader' and
$node->type != 'separator'}
<li class="parent"><a class="parent" href="{$node->url}"{if
$node->target}target="{$node->target}" {/if}><span>{$node->menutext}</span></a>

{elseif $node->current == true}
<li class="currentpage"><h3><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->target}target="{$node->target}"
{/if}><span>{$node->menutext}</span></a>

{/if}

{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}
 
      
avatar
Date: 2009-10-06 10:54
Posted By: jeremy baker (coasterfrj)

When I Create new content pages. And set the _blank when I click the link in the
navigation it does not open in a new window.  I'm using the left simple + 1
colmn layout and the simple verticle nav
      
avatar
Date: 2009-10-06 13:35
Posted By: Rolf (rolf1)

Jeremy,

I've tested the above on another site and it works fine...
Did you put the changed code into the simple_navigation.tpl file?
Or did you create a new template in the MenuManager?
In the last case you have to change the menu tag in the html template!

{menu template='your_name' collapse='1'} There hasn't be .tpl after the template
name now.

Regards, Rolf
      
avatar
Date: 2009-10-07 03:35
Posted By: Rolf (rolf1)

Hi Jeremy,

Talked with the dev's about this yesterday.
The menu template simple_navigation.tpl is intentionally kept 'simple', so the
_blank stuff isn't in there.

If you use the accessible_simple_navigation.tpl it does have al the features!

If you change this in your html template, your site should work as expected:
{menu template='accessible_simple_navigation.tpl' collapse='1'}

Soo, what looks like a bug... Isn't...
Thanks for the report thought ;o)

Regards, 
Rolf
      
Updates

Updated: 2009-10-07 15:02
resolution_id: 5 => 9
state: Open => Closed

Updated: 2009-10-06 08:36
resolution_id: => 5