detailtemplate and summarytemplate news parameters

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
sainsbury

detailtemplate and summarytemplate news parameters

Post 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
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: detailtemplate and summarytemplate news parameters

Post by Dr.CSS »

You were close....

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

Re: detailtemplate and summarytemplate news parameters

Post 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!
Locked

Return to “CMSMS Core”