Page 1 of 1
cmsms 1.6, external link target bug
Posted: Fri Jun 26, 2009 8:45 am
by rimvydukas
Hi,
So I have new fresh installation of cmsms 1.6 without any modifications. When I create a page with type external link and set target to _blank and when I press on new created link it opens in the same page and tot the new one. Checked source - no _blank anywhere. How to solve this bug? Thanks.
Re: cmsms 1.6, external link target bug
Posted: Fri Jun 26, 2009 12:58 pm
by blast2007
Can't reproduce this problem, also with 1.6 fresh installed.
Did you try resetting TinyMCE settings?
Post your CMSMS and module version.
regards
blast
Re: cmsms 1.6, external link target bug
Posted: Sun Jun 28, 2009 10:38 pm
by Sonya
I can confirm and guess, that target is now only loaded if you add loadprops="1" to the menu tag.
Re: cmsms 1.6, external link target bug
Posted: Mon Jun 29, 2009 9:30 am
by rimvydukas
Can you be more specific? Where exactly must I add this loadprops=1 stuff?
Re: cmsms 1.6, external link target bug
Posted: Mon Jun 29, 2009 9:39 am
by alby
rimvydukas wrote:
Can you be more specific? Where exactly must I add this loadprops=1 stuff?
in {menu template='xxxx' ...... loadprops=1} tag of your template page
BUT check if this menu template has $node->target or add in
Alby
Re: cmsms 1.6, external link target bug
Posted: Mon Jun 29, 2009 12:49 pm
by rimvydukas
Hi,
I'm using standard CSSMenu left + 1 column template.
I made following change:
{menu template='cssmenu.tpl' loadprops=1}
but nothing has changed. Where must I add and how exactly this other part - $node->target
And why such changes? I can remember that in previous versions it was enough to set only target option in external link's options tab.
Re: cmsms 1.6, external link target bug
Posted: Mon Jun 29, 2009 2:27 pm
by xfm
I have a fresh install of cmsms 1.6, and I can confirm this bug. Didn't found a good solution right away, because the proposed solution didn't work for me:
Code: Select all
{menu template='simple_navigation.tpl' collapse='1' loadprops='1'}
That is because the simple_navigation.tpl does not have that {$node->target} specified. And even less convenient is that this template is read only. The only thing that worked for me is to:
(1) Make a copy of the simple_navigation.tpl, by going to Layout » Menu Manager, and click the icon Import Template to Database.
(2) Give it a new name, e.g. MyTemplate
(3) Edit MyTemplate and add to every link definition the following: {if $node->target ne ""} target="{$node->target}"{/if}
For example:
into:
Code: Select all
<li><a href="{$node->url}" {if $node->target ne ""} target="{$node->target}"{/if}>
(4) Edit the used Layout »Templates and edit the line {menu template='xxxx' collapse='1' } to {menu template='MyTemplate' collapse='1' loadprops='1'}
For me that fixed the problem.
Re: cmsms 1.6, external link target bug
Posted: Mon Jun 29, 2009 2:46 pm
by calguy1000
This issue is confirmed and will either be fixed in the upcoming 1.6.1 release... or if necessary a 1.6.2 release.
But the problem is minor. it's a two part problem.
a) you need to add the loadprops=1 parameter onto the {menu} tag. This is because the target parameter is essentially an 'additional property' to the content types... and yeah, I know that's ugly.. it's a design issue that we should look at working around.
b) the simple_navigation.tpl and other menu manager templates aren't using the {$node->target} value at all. This will be rectified
but in the mean time.... just try adding:
Code: Select all
{if isset($node->target)}target="{$node->target}" {/if}
into the appropriate place in your menu manager template(s).