Page 1 of 1
[SOLVED] Found a bug in cmsms 1.6.6 - pdf as external link _blank
Posted: Wed Dec 30, 2009 4:19 pm
by Snigx
Im trying to open a pdf as an external link in a _blank page.
As a test Im using the cmsms page (how to use cmsms) that is installed with the system as I chose.
The link I made works fine in the dropdown menu at the top of the first page. It opens in another window, but when I, using the dropdown menu "how cmsms works >> templates and stylesheets" and from there press button for the pdf it opens in the same window...
How can I change this?
I use cmsms 1.6.6, freshly installed.
You can try it here:
http://jernbanemaerker.3dz.dk/
- dropdown "how CMSMS works" >> "byttedag" this pops up nicely in another window
- dropdown "how CMSMS works" >> "templates and stylesheets" from there hit the "byttedag" button on the left,.. this one opens in the same "_self" window
Best regards SnigX
Re: Found a bug in cmsms 1.6.6 - pdf as external link _blank
Posted: Wed Dec 30, 2009 4:47 pm
by scooper
I'm assuming you've just added the link to that pdf as an 'External Link' content type.
If you have then on the 'options' tab for that link there is a drop down list 'Target' - you just need to select '_blank' from the list and then the link will open in a new window.
s.
Re: Found a bug in cmsms 1.6.6 - pdf as external link _blank
Posted: Wed Dec 30, 2009 5:41 pm
by Snigx
Yes I just added the pdf as an "external link" and I have under "options" tab selected "_blank" in target. As I wrote in the question it works fine in the "dropdown" menu which opens in another window but if you use ex. dropdown "how CMSMS works" >> "content" and from there hit the "byttedag" button on the left it opens in the same window, which i believe to be a bug.
I just wondered how to fix it. =)
Re: Found a bug in cmsms 1.6.6 - pdf as external link _blank
Posted: Wed Dec 30, 2009 6:50 pm
by Rolf
Hi Snigx,
You have to use an accessible_ menu template to use this option.
Regards, Rolf
Re: Found a bug in cmsms 1.6.6 - pdf as external link _blank
Posted: Wed Dec 30, 2009 6:58 pm
by scooper
Ah - I see what you mean now.
The menu template that you're using there is just a simple template (in fact simple_navigation.tpl).
If you want to use that style but add the target attribute then you can import the simple_navigation.tpl to the database and add
Code: Select all
{if $node->target}target="{$node->target}" {/if}
to your new template. Have a look at one of the other template that do use it to see where it should go (cssmenu.tpl for example).
s.
Re: Found a bug in cmsms 1.6.6 - pdf as external link _blank
Posted: Wed Dec 30, 2009 7:09 pm
by RonnyK
or call the accessible_ variant of the same template....
Like "accessible_simple_navigation.tpl " instead of "simple_navigation.tpl "
or
"accessible_cssmenu.tpl" instead of "cssmenu.tpl"
Ronny
Re: Found a bug in cmsms 1.6.6 - pdf as external link _blank
Posted: Wed Dec 30, 2009 8:16 pm
by Snigx
hmm im not sure if im doing it correctly... under "menu management" i see a list of menues: simple_navigation.tpl, cssmenu.tpl, accessible_simple_navigation.tpl and so forth.
Default is set to simple_navigation.tpl - I try to set default as accessible_simple_navigation.tpl and refresh my site, but nothing seems to happen, its exactly as before...
Then I try to "import template to database" simple_navigation.tpl and type in the line scooper wrote more or less, but still nothing happens not even if I make the syntax wrong on purpose?!
Is there anything I need to do other than just change the default to ex. accessible_simple_navigation.tpl to make it work?
Hope its not too annoying questions... =)
Re: Found a bug in cmsms 1.6.6 - pdf as external link _blank
Posted: Wed Dec 30, 2009 8:18 pm
by RonnyK
Check your template, attached to your page... The call to a menutemplate is made there... There you should make the change to the menutemplate. By setting another menutemplate as default, you only set what template is used when {menu} is called.. In your page-template {menu template="sometemplate.tpl"} is called, so no matter what is default that one is taken. Change that call to the accessible_ one....
Ronny
Re: Found a bug in cmsms 1.6.6 - pdf as external link _blank
Posted: Wed Dec 30, 2009 8:20 pm
by Rolf
Hi Snigx
Hope its not too annoying questions... =)
No problem, we are here to help you ;)
You have to change the {menu} tag in your HTML template Layout >> Templates
There will be something like:
Code: Select all
{menu template='simple_navigation.tpl' collapse='1'}
Changed it to:
Code: Select all
{menu template='accessible_simple_navigation.tpl' collapse='1'}
Regards, Rolf :)
Re: Found a bug in cmsms 1.6.6 - pdf as external link _blank
Posted: Wed Dec 30, 2009 9:45 pm
by Snigx
ahh yes, but of cause
Makes sense, now it works! thx a bunch to all you guys for spending time helping me =)
Now I just need to discover the rest of cmsms, cant take that long
