Help with News Header

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
toto
Forum Members
Forum Members
Posts: 29
Joined: Tue Nov 07, 2006 11:38 am

Help with News Header

Post by toto »

Hello, Friends.

I place a header in news template, but if there is no news only the header is shown. How to remove it?

Example i want to show.

Header - Special News:
New-1
New-2
New-3

And if ther is no any new - to show nothing.
cyberman

Re: Help with News Header

Post by cyberman »

Can you post your news template? It would be a lot easier to help ...
toto
Forum Members
Forum Members
Posts: 29
Joined: Tue Nov 07, 2006 11:38 am

Re: Help with News Header

Post by toto »

Code: Select all



<div class="news">

<h2>Special NEWS section</h2>
{foreach from=$items item=entry}
<p>{if $entry->formatpostdate}{$entry->formatpostdate}{/if}<br />
{if $entry->summary}{eval var=$entry->summary} {$entry->morelink} »»</p>

{else if $entry->content}
{eval var=$entry->content}
{/if}{/foreach}</div>


cyberman

Re: Help with News Header

Post by cyberman »

Change it to

Code: Select all

<div class="news">
{if $itemcount != '0'}
<h2>Special NEWS section</h2>
{foreach from=$items item=entry}
<p>{if $entry->formatpostdate}{$entry->formatpostdate}{/if}<br />
{if $entry->summary}{eval var=$entry->summary} {$entry->morelink} »»</p>

{else if $entry->content}
{eval var=$entry->content}
{/if}{/foreach}</div>
{/if}
toto
Forum Members
Forum Members
Posts: 29
Joined: Tue Nov 07, 2006 11:38 am

Re: Help with News Header

Post by toto »

Solved!

Thank you cyberman its work perfect.
Post Reply

Return to “Modules/Add-Ons”