Page 1 of 1
target="_blank" NOT working - and other threads DID NOT HELP
Posted: Sat Apr 24, 2010 1:15 am
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
Re: target="_blank" NOT working - and other threads DID NOT HELP
Posted: Sat Apr 24, 2010 3:12 am
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...
Re: target="_blank" NOT working - and other threads DID NOT HELP
Posted: Sat Apr 24, 2010 5:53 am
by Crud O Matic
even if it is the one and only and set to default?
Re: target="_blank" NOT working - and other threads DID NOT HELP
Posted: Sat Apr 24, 2010 4:23 pm
by Dr.CSS
Do you have a link?...
Re: target="_blank" NOT working - and other threads DID NOT HELP
Posted: Wed Apr 28, 2010 6:17 am
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??
Re: target="_blank" NOT working - and other threads DID NOT HELP
Posted: Thu Apr 29, 2010 5:40 pm
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...
Re: target="_blank" NOT working - and other threads DID NOT HELP
Posted: Fri May 07, 2010 11:00 pm
by Crud O Matic
imported accessibility template, called it and the target blank STILL didn't show up
Re: target="_blank" NOT working - and other threads DID NOT HELP
Posted: Sat May 08, 2010 6:53 am
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
Re: target="_blank" NOT working - and other threads DID NOT HELP
Posted: Wed May 12, 2010 9:58 pm
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>
Re: target="_blank" NOT working - and other threads DID NOT HELP
Posted: Thu May 13, 2010 7:28 am
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
Re: target="_blank" NOT working - and other threads DID NOT HELP
Posted: Fri May 14, 2010 11:31 am
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.
Re: target="_blank" NOT working - and other threads DID NOT HELP
Posted: Fri May 14, 2010 11:48 am
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
Re: target="_blank" NOT working - and other threads DID NOT HELP
Posted: Mon Jun 07, 2010 3:53 pm
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