Help request for News template

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
Garamond
Forum Members
Forum Members
Posts: 15
Joined: Tue Mar 21, 2006 7:55 pm
Location: Finland

Help request for News template

Post by Garamond »

Hi there,
I'm using News module with 0.12 and I'm trying to make my own summary template that displays only date and summary. So no title nor more-link. The problem is I don't know how to make the summary link to the article in template.

Can anyone help me?
katon

Re: Help request for News template

Post by katon »

The link is compiled in the module code.  I am afraid you need to hack the code to do this.
Garamond
Forum Members
Forum Members
Posts: 15
Joined: Tue Mar 21, 2006 7:55 pm
Location: Finland

Re: Help request for News template

Post by Garamond »

So can anyone help me with this? My php and smarty coding skills are near zero...
Andor
Forum Members
Forum Members
Posts: 49
Joined: Sun Feb 19, 2006 1:42 pm

Re: Help request for News template

Post by Andor »

Hi,
There is a tab in the news module named 'Summary Template' (Go Content>>News in Admin). Just comment out the things you want to get rid off.

I didn't want the Category, Date and Author. My template looks like this:


{foreach from=$items item=entry}



{$entry->titlelink}

End of comment to get the above lines out

Hope this helps  ;)

Andor
katon

Re: Help request for News template

Post by katon »

Try using the following template content:

Code: Select all


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

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

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

</div>
{/foreach}
<!-- End News Display Template -->
Garamond
Forum Members
Forum Members
Posts: 15
Joined: Tue Mar 21, 2006 7:55 pm
Location: Finland

Re: Help request for News template

Post by Garamond »

Andor: that was something I knew very well, but was not what I was asking

katon: that was what I was actually asking, but unfortunally that didn't work. I guess it was missing "-sign and that {$onerow->link} didn't actually print a thing. It resulted all blank. So the end result in browser was something like summary.

But it's all right for now as I guess I go with the morelink. It looked better after all... But thanks anyway. :)
Post Reply

Return to “CMSMS Core”