Page 1 of 1

Help request for News template

Posted: Tue Mar 28, 2006 8:53 pm
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?

Re: Help request for News template

Posted: Wed Mar 29, 2006 9:44 am
by katon
The link is compiled in the module code.  I am afraid you need to hack the code to do this.

Re: Help request for News template

Posted: Wed Mar 29, 2006 5:37 pm
by Garamond
So can anyone help me with this? My php and smarty coding skills are near zero...

Re: Help request for News template

Posted: Wed Mar 29, 2006 5:50 pm
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

Re: Help request for News template

Posted: Wed Mar 29, 2006 6:16 pm
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 -->

Re: Help request for News template

Posted: Wed Apr 05, 2006 7:38 pm
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. :)