[solved] target|default:'_self don't work

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
emldesign
New Member
New Member
Posts: 7
Joined: Sat Sep 25, 2010 5:35 pm

[solved] target|default:'_self don't work

Post by emldesign »

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
Last edited by emldesign on Mon Sep 27, 2010 2:31 pm, edited 1 time in total.
emldesign
New Member
New Member
Posts: 7
Joined: Sat Sep 25, 2010 5:35 pm

Re: [added] target|default:'_self don't work

Post by emldesign »

I'm still looking for this issue. And I've seen than the code generated in front end is good.

I've put the {breadcrumbs} on other pages and when I clik on the parent the issue is the same; it opens the link in a _blank inless than a _self.

Nobody to help please ?
spcherub
Power Poster
Power Poster
Posts: 402
Joined: Fri Jun 06, 2008 5:54 pm

Re: [added] target|default:'_self don't work

Post by spcherub »

Have you looked into the "Target" field under the Options tabs for every page in question? If this is set to anything other than none, it will affect your menu template.

To find this option, edit any page (that is in the menu), then go to the "Options" tab and see what the "Target" field is set to (it should be "none") for your example.

Sanjay
emldesign
New Member
New Member
Posts: 7
Joined: Sat Sep 25, 2010 5:35 pm

Re: [added] target|default:'_self don't work

Post by emldesign »

Hi Sanjay,

I've edited the target of all my pages to "_self" but the issue persist.

I tried to put my website online to check if the issue persist and yes, it persists too :
http://www.lamaisondespetitescanailles.be
uniqu3

Re: [added] target|default:'_self don't work

Post by uniqu3 »

@emldesign don't you think this piece of code could be your issue?
// opens a link in a new tab
$('a[href^=http]').click( function() {
window.open(this.href);
return false;
});
So in your premium.js file you state that http should open in new tab, well navigation is also built like:
Blog
Hope this helps.
emldesign
New Member
New Member
Posts: 7
Joined: Sat Sep 25, 2010 5:35 pm

Re: [added] target|default:'_self don't work

Post by emldesign »

Hi uniqu3 thank you! This function was in the original files were the issue don't appear.

But... I tried to delete it simply.... AND It works well now !!!!  :D

It seems to be stable without this function, so that's ok for me !

@Everybody Thanks for your attention
Post Reply

Return to “Layout and Design (CSS & HTML)”