target="_blank" NOT working - and other threads DID NOT HELP

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
Crud O Matic
Forum Members
Forum Members
Posts: 10
Joined: Tue Sep 18, 2007 6:21 am

target="_blank" NOT working - and other threads DID NOT HELP

Post by Crud O Matic »

Hello,

I have an external link, and even though i have followed other threads on how to get target="_blank" working, it still isn't

here is the menu template:

Code: Select all

{if $count > 0}
<ul id="top-nav" class="horizontalStrippedList top-nav">
{foreach from=$nodelist item=node}
	{if $node->depth > $node->prevdepth}
		{repeat string="<ul class=\"horizontalStrippedList bottom-nav\">" 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}
	<li><a href="{$node->url}"{if $node->target != ''} target="{$node->target}"{/if}>{$node->menutext}</a>
{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}
also here is an example of my menu tag:

Code: Select all

{menu loadprops="1" items="events,offers,ourstory,directions,employment,contact"}
Now before you tell me to put 0 in loadprops, I've already tried that. No matter what I do, the target blank isn't being set... and yes, in the link options i set the dropdown to "_blank"

Any help would be appreciated... Thanks in advance,

Crud
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: target="_blank" NOT working - and other threads DID NOT HELP

Post by Dr.CSS »

If that is exactly the menu tag you use it doesn't call the menu template, since the menu template you show above it is a customized one you need to call it in menu tag...
Crud O Matic
Forum Members
Forum Members
Posts: 10
Joined: Tue Sep 18, 2007 6:21 am

Re: target="_blank" NOT working - and other threads DID NOT HELP

Post by Crud O Matic »

even if it is the one and only and set to default?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: target="_blank" NOT working - and other threads DID NOT HELP

Post by Dr.CSS »

Do you have a link?...
Crud O Matic
Forum Members
Forum Members
Posts: 10
Joined: Tue Sep 18, 2007 6:21 am

Re: target="_blank" NOT working - and other threads DID NOT HELP

Post by Crud O Matic »

http://test.njbistro.com/index.php?page=menu

at very bottom - BLACK on BLACK for now as it was meant for menu at top of page - trying to get the target blank problem solved before i make a new template for the bottom menu

the link is in the far bottom-right corner, black on black, called "Our Facebook Group"

I've tried calling the template name and everything - no target="_blank" is being added to link

also, did I mention it is an external link??
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: target="_blank" NOT working - and other threads DID NOT HELP

Post by Dr.CSS »

Import one of the accessibility menu templates to see how it is called, they are the only ones that will pick up the target='_blank' calls...
Crud O Matic
Forum Members
Forum Members
Posts: 10
Joined: Tue Sep 18, 2007 6:21 am

Re: target="_blank" NOT working - and other threads DID NOT HELP

Post by Crud O Matic »

imported accessibility template, called it and the target blank STILL didn't show up
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: target="_blank" NOT working - and other threads DID NOT HELP

Post by RonnyK »

Crud,

could you test with the call

{menu template="accessible_simple_navigation.tpl"}

and tell if that is working for the call ?

Could you otherwise post or PM the template of the page you use.

Ronny
Crud O Matic
Forum Members
Forum Members
Posts: 10
Joined: Tue Sep 18, 2007 6:21 am

Re: target="_blank" NOT working - and other threads DID NOT HELP

Post by Crud O Matic »

doesn't matter how I do it, it won't display target="_blank" I've already tried every single template, way to call it, etc... and STILL DOESN"T SHOW UP.

Menu template (nj-bottom-menu):

Code: Select all

{if $count > 0}
<ul class="horizontalStrippedList bottom-nav">
{counter assign="countitems" start=0}
{foreach from=$nodelist item=node}
	{if $node->depth > $node->prevdepth}
		{repeat string="<ul class=\"verticalStrippedList\">" 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}
	{counter assign="countitems"}
	<li><a href="{$node->url}"{if $countitems > 1} class="bottom-nav-decor"{/if}{if $node->target != ''} target="{$node->target}"{/if}>{$node->menutext}</a>
{/foreach}
{repeat string="</li></ul>" times=$node->depth-1}</li>
</ul>
{/if}
Page template:

Code: Select all

{process_pagedata}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		{metadata}
		
		<title>{sitename} - {title}</title>
		
		<!-- Structure -->
		{stylesheet}
		
		<!-- Nivo Slider -->
		{stylesheet name='nivo'}
		{global_content name='slider-setup'}
	</head>
</__body>
<div id="layout" class="layout">
	<div id="nav-container" class="nav-container">
		<img src="/images/skin/default/logo.png" alt="Nicholas James Bistro" title="" class="floatleft" style="width: 192px; height: 75px;" />
		{menu loadprops="1" template="nj-top-menu" items="home,todaysspecials,menu,prixfixe,catering,winelist,holidaymenu,corpmenu"}
	</div>
	
	<div id="mainarea" class="line mainarea">
		<div id="reservations" class="unit size1of5">
			{global_content name='left-side-forms'}
		</div>
		
		<div id="content" class="unit size4of5 lastUnit">
			{global_content name='slider'}
			
			<div class="marginhalfem">
			<h1>{title}</h1>
			{content}
			</div>
		</div>
	</div>
	
	<div id="footer" class="footer">
		<ul id="bottom-nav" class="verticalStrippedList alignleft">
			<li>
				{menu loadprops="1" template="nj-bottom-menu" items="events,offers,ourstory,directions,employment,contact"}
			</li>
			<li>
				{menu loadprops="1" template="nj-bottom-menu" items="guestbook,photos,newsletter,reviews,giftcert,facebook"}
			</li>
		</ul>
	</div>
</div>
<__body>
</__html>
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: target="_blank" NOT working - and other threads DID NOT HELP

Post by RonnyK »

What version of CMSMS are you running?

If you want, you could PM me a login for a site, to see from the backend if I see something there?

Ronny
Crud O Matic
Forum Members
Forum Members
Posts: 10
Joined: Tue Sep 18, 2007 6:21 am

Re: target="_blank" NOT working - and other threads DID NOT HELP

Post by Crud O Matic »

version 1.6.7 (cant run 1.7, only php 4 on machine)

i don't know about giving a login - what can you see with just a limited account? If you can find the problem with a regular NON admin account then I'll give you one. Nothing against you, but I already played that game back in the 90's lol.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: target="_blank" NOT working - and other threads DID NOT HELP

Post by RonnyK »

limited account is fine... I was meaning a cmsms-account, where I could see the pages and f.e. add a new page with a default template. That one I could hide from the menu, to not interfere with the frontend, but still make it a testpage.

Ronny
mr.bacan

Re: target="_blank" NOT working - and other threads DID NOT HELP

Post by mr.bacan »

I don't know if you have tried it, but try chaging this line:
url}"{if $countitems > 1} class="bottom-nav-decor"{/if}{if $node->target != ''} target="{$node->target}"{/if}>{$node->menutext}
to this:
url}"{if $countitems > 1} class="bottom-nav-decor"{/if}{if $node->target} target="{$node->target}" {/if}>{$node->menutext}
I has worked for me every time.

Good luck Crud.

Mr. Bacan
Post Reply

Return to “CMSMS Core”