Problem with news module templates...

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
rubberglover
Forum Members
Forum Members
Posts: 53
Joined: Mon Jul 23, 2007 5:30 pm

Problem with news module templates...

Post by rubberglover »

Hi all, this is my first post and I've not been using CMSMS long so bare with me!

I'm using CMSMS v1.1, unsure of mySQL and PHP versions at present as it's a new hosting account. Can post if anyone needs these details. News module is installed at version 2.3.

I'm trying to build a news archive page that's linked from a home page showing just the last three posts. Got the template sorted for the home page, and built another template for the archive page, but I get an error whilst trying to use it. Here's what I've done...

Built default Built home page and called the news module like so...

{news number='3'}

This works fine as no template has been defined in the parameters so it just uses my default template called "summary.tpl", which was created using the "create a new template" link in the news module. It has been set as the default template.

I've then put a link below this to a "news archive" page which uses a seperate template with pagination... This template was saved as "archiveSummary.tpl" and uploaded to the "/modules/news/templates" folder, and was called using the following code...

{cms_module module='news' number='5' summarytemplate='archiveSummary.tpl'}

...when I try to access the page i get the following error:

string(85) "Smarty error: unable to read resource: "module_db_tpl:News;summaryarchiveSummary.tpl""

I tried copying and pasting the content from this archive template over the "summary.tpl" used on the home page and it works fine there. I also tried the following embed...

{news number='3' number='5' summarytemplate='archiveSummary.tpl'}

... but got the same error. Any ideas????

P.S. I've had trouble getting the news module to accept any parameters in the past, even on the older news module version that ships with CMSMS v1.0.8 - for example when i try to add the makerssbutton='true' parameter it doesn't display any news posts at all!
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Problem with news module templates...

Post by Dr.CSS »

The parameters still say you can use a template in the template folder, so first check that it's a .tpl and didn't get some other extension, and you should be able to call it like the last tag...

{news number='3' number='5' summarytemplate='archiveSummary.tpl'}  just use dbl. quotes " " around the template name...
{news makerssbutton='true'}
The RSS feed call has to be added with the other tag, like above, as you see it just makes the button, but it will ask to subscribe for all the news items on the page so only one news call is allowed...
User avatar
chilsta
Forum Members
Forum Members
Posts: 52
Joined: Thu Oct 20, 2005 8:22 pm

Re: Problem with news module templates...

Post by chilsta »

Thought I'd add in here that this has been solved: http://forum.cmsmadesimple.org/index.ph ... 643.0.html

C*
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Problem with news module templates...

Post by RonnyK »

As the problem is solved in SVN, it should have been included in release 1.1.1 of CMSMS that was released earlier this week.

Ronny
Post Reply

Return to “CMSMS Core”