Links don't work when I use cms_module tag

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.
Locked
Peter Gasston

Links don't work when I use cms_module tag

Post by Peter Gasston »

Hi,

I want to have a number of different pages which display news; for example, a homepage with story summarys and an archive page without. My homepage uses the {content} tag, so to make an archive page I think I have to use {cms_module detailtemplate="sometemplate.tpl"}. However, when I use that code, every time I click on a link I stay on the archive page. When using {content} I am taken to a detail page as normal.  The only difference in the URLs generated by {content} and {cms_module} is the final variable:

{content} cntnt01returnid=Archive
{cms_module} cntnt01returnid=40

How can I change the variable when using {cms_module} so that the URLs work?

Thought: do I have to create a detailtemplate before this will work? In the module help it says this is optional.

I could really do with some help; please let me know if this wasn't clear, so I can explain it better.
Peter Gasston

Re: Links don't work when I use cms_module tag

Post by Peter Gasston »

Sorry, I included that in my code but I forgot to write it here. In my code it's:

Code: Select all

{cms_module module='News' detailtemplate='sometemplate.tpl'}
And I get the problem described in my post.

Please see my site to understand the problem:

http://www.arsenalnewsreview.co.uk/inde ... ge=Archive

When you click on a news story you don't leave the page.
Peter Gasston

Re: Links don't work when I use cms_module tag

Post by Peter Gasston »

That's it! Just what I wanted! Thanks so much!
warpdesign

Re: Links don't work when I use cms_module tag

Post by warpdesign »

Hi everyone,

Noob question: how do I figure out what the name of my template is? I.e. sometemplate.tpl, is that just the template name followed by .tpl? Cause the themplate names have spaces in them (such as EllNav Horiz Only 1 col in the demo site) so EllNav Horiz Only 1 col.tpl doesn't seem right and I can't find any .tpl files in the site structure on the FTP server...
warpdesign

Re: Links don't work when I use cms_module tag

Post by warpdesign »

Hmm, Ok I found those files but I'm still not getting it. Maybe I need to start from the beginning. My question is how do I select the template (site template I think?) that is used to display the detail when someone clicks on a module item? Right now it just uses the same template that the page is currently on, I would like it to use a different template. For instance I have the news "blurbs" on the right column of every single page, but let's say someone is in a section called 'About Us' or 'Contact Us' and clicks a news article, it still says 'contact us' at the top of the page, it doesn't make sense, it should say 'News'.
warpdesign

Re: Links don't work when I use cms_module tag

Post by warpdesign »

Thanks! I'll give it a try.
Locked

Return to “CMSMS Core”