Page 1 of 1

detailtemplate and summarytemplate news parameters

Posted: Tue Oct 03, 2006 2:03 pm
by sainsbury
Hi,

I'm trying to insert some news items in two different parts of a site, and I need each sets of news to display differently.Therefore I want to define a different detailtemplate and summarytemplate for each section. I am using the following tag:

Code: Select all

{news number="1" category="general" moretext="Read more..." detailpage="News" summarypage="foto-news-summary.tpl"}
I have placed the foto-news-summary.tpl file in modules/News/templates and it looks like this, it's basically just the default one with author and category removed:

Code: Select all

<!-- Start News Display Template -->
{foreach from=$items item=entry}
<div class="NewsSummary">f000000000

{if $entry->formatpostdate}
	<div class="NewsSummaryPostdate">
		{$entry->formatpostdate}
	</div>
{/if}

<div class="NewsSummaryLink">
	{$entry->titlelink}
</div>

{if $entry->summary}
	<div class="NewsSummarySummary">
		{eval var=$entry->summary}
	</div>

	<div class="NewsSummaryMorelink">
		{$entry->morelink}
	</div>

{else if $entry->content}

	<div class="NewsSummaryContent">
		{eval var=$entry->content}
	</div>
{/if}

</div>
{/foreach}
<!-- End News Display Template -->
I have followed the thread here: http://forum.cmsmadesimple.org/index.ph ... 557.0.html and have tried:
  • Removing one of them, so I only have detailtemplate="" OR summarytemplate="", not both
  • Turning off pretty URLs
But none of this works! Any thoughts anyone?

Thanks in advance,
Chris

Re: detailtemplate and summarytemplate news parameters

Posted: Tue Oct 03, 2006 3:19 pm
by Dr.CSS
You were close....

{news number="1" category="general" moretext="Read more..." detailpage="News" summarytemplate="foto-news-summary.tpl"}

Re: detailtemplate and summarytemplate news parameters

Posted: Tue Oct 03, 2006 3:23 pm
by sainsbury
Ha ha schoolboy error. Thanks a lot for your help. I'm gonna donate to the project soon 'cos I'm about to start my 3rd CMSMS deploy, good work guys!