[SOLVED] Found a bug in cmsms 1.6.6 - pdf as external link _blank

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
Snigx
Forum Members
Forum Members
Posts: 30
Joined: Wed Dec 30, 2009 2:31 pm

[SOLVED] Found a bug in cmsms 1.6.6 - pdf as external link _blank

Post 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
Last edited by Snigx on Wed Dec 30, 2009 9:45 pm, edited 1 time in total.
scooper
Forum Members
Forum Members
Posts: 242
Joined: Fri Dec 09, 2005 12:36 pm

Re: Found a bug in cmsms 1.6.6 - pdf as external link _blank

Post 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.
Snigx
Forum Members
Forum Members
Posts: 30
Joined: Wed Dec 30, 2009 2:31 pm

Re: Found a bug in cmsms 1.6.6 - pdf as external link _blank

Post 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. =)
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Found a bug in cmsms 1.6.6 - pdf as external link _blank

Post by Rolf »

Hi Snigx,

You have to use an accessible_ menu template to use this option.

Regards, Rolf
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
scooper
Forum Members
Forum Members
Posts: 242
Joined: Fri Dec 09, 2005 12:36 pm

Re: Found a bug in cmsms 1.6.6 - pdf as external link _blank

Post 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.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Found a bug in cmsms 1.6.6 - pdf as external link _blank

Post 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
Snigx
Forum Members
Forum Members
Posts: 30
Joined: Wed Dec 30, 2009 2:31 pm

Re: Found a bug in cmsms 1.6.6 - pdf as external link _blank

Post 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... =)
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Found a bug in cmsms 1.6.6 - pdf as external link _blank

Post 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
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Found a bug in cmsms 1.6.6 - pdf as external link _blank

Post 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  :)
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Snigx
Forum Members
Forum Members
Posts: 30
Joined: Wed Dec 30, 2009 2:31 pm

Re: Found a bug in cmsms 1.6.6 - pdf as external link _blank

Post by Snigx »

ahh yes, but of cause :D

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 :P
Post Reply

Return to “CMSMS Core”