News-Module ignores 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.
Locked
AKsen

News-Module ignores Templates???

Post by AKsen »

Dear User,

I've a problem with my templates in the News-Module. It seems like there is no correlation between the template and the output.

For better understanding i've copied the two different templates:

Original Template:
{foreach from=$items item=entry}



{$entry->titlelink}



{$entry->category}


{if $entry->formatpostdate}

{$entry->formatpostdate}

{/if}

{if $entry->author}

{$entry->author}

{/if}

{if $entry->summary}

{eval var=$entry->summary}



[{$entry->morelink}]


{else if $entry->content}


{eval var=$entry->content}

{/if}


{/foreach}

Modified Template:
{foreach from=$items item=entry}



{$entry->titlelink}


{if $entry->summary}

{eval var=$entry->summary}



[{$entry->morelink}]


{else if $entry->content}


{eval var=$entry->content}

{/if}


{/foreach}
Both templates induce the same output...
Anyone knows the problem and can help me?
Thanks a lot,
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: News-Module ignores Templates???

Post by Dr.CSS »

did you put a call to your new template in the tag?...
is the new template in the template box of news or did you make a new one somewhere else?...
from News Help...

# (optional) summarytemplate="sometemplate.tpl" - Use a separate template for displaying the article summary. It have to live in modules/News/templates.
# (optional) detailtemplate="sometemplate.tpl" - Use a separate template for displaying the article detail. It have to live in modules/News/templates.

tag should look some thing like this...

{cms_module module="news" summarytemplate="yourtemplate.tpl" detailtemplate="yourtemplate.tpl"}
AKsen

Re: News-Module ignores Templates???

Post by AKsen »

The new template is in the templatebox of the news-module. I changed it only using copy&paste. I haven't start a new template. If  I want to create a new template like you've written, where do I have to put this
{cms_module module="news" summarytemplate="yourtemplate.tpl" detailtemplate="yourtemplate.tpl"}
tag?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: News-Module ignores Templates???

Post by Dr.CSS »

where ever you would use {cms_module module="news" } if you add the extra summarytemplate="yourtemplate.tpl" detailtemplate="yourtemplate.tpl" then the news on that page should look the way you want...
the tag can go in the template in a or in a box in Content » Pages » Edit Page: yourpage "in the source view"...
main content, side bar, footer, header, in the breadcrumb...
Locked

Return to “CMSMS Core”