Page 1 of 1

Help with News Header

Posted: Tue Jun 19, 2007 3:49 pm
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.

Re: Help with News Header

Posted: Tue Jun 19, 2007 7:07 pm
by cyberman
Can you post your news template? It would be a lot easier to help ...

Re: Help with News Header

Posted: Wed Jun 20, 2007 11:27 am
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>



Re: Help with News Header

Posted: Thu Jun 21, 2007 7:26 am
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}

Re: Help with News Header

Posted: Fri Jun 22, 2007 11:23 am
by toto
Solved!

Thank you cyberman its work perfect.