News module doc page
Posted: Sun Nov 17, 2013 8:31 am
At the bottom of the page "Documentation - Modules - News" is an example how to not show anything if no news articles are active:
I found this to not be working, like does someone else in my forum post.
http://forum.cmsmadesimple.org/viewtopi ... 28&t=68592
But from this post, another code resultet which at least in my case, does work:
Code: Select all
{capture assign=news_there}{news}{/capture}
{if $news_there}
<div id="news">
<h3>News</h3>
{news}
</div>
{/if}
http://forum.cmsmadesimple.org/viewtopi ... 28&t=68592
But from this post, another code resultet which at least in my case, does work:
Code: Select all
{if $items|@count == 0}
nada
{else}
{foreach from=$items item=entry}
{$entry->postdate|cms_date_format}<br>
{$entry->summary|cms_escape:htmlall}<br>
<a href="{$entry->moreurl}"> MORE</a>
{/foreach}
{/if}