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.
Help with News Header
Re: Help with News Header
Can you post your news template? It would be a lot easier to help ...
Re: Help with News Header
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
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
Solved!
Thank you cyberman its work perfect.
Thank you cyberman its work perfect.