Page 1 of 1

News-Module ignores Templates???

Posted: Sat Jun 24, 2006 12:14 pm
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,

Re: News-Module ignores Templates???

Posted: Sat Jun 24, 2006 2:06 pm
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"}

Re: News-Module ignores Templates???

Posted: Sat Jun 24, 2006 2:52 pm
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?

Re: News-Module ignores Templates???

Posted: Sun Jun 25, 2006 5:22 am
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...