CMS Made Simple Forums
https://forum.cmsmadesimple.org/

News module doc page
https://forum.cmsmadesimple.org/viewtopic.php?f=81&t=68630
Page 1 of 1

Author:  thomahawk [ Sun Nov 17, 2013 8:31 am ]
Post subject:  News module doc page

At the bottom of the page "Documentation - Modules - News" is an example how to not show anything if no news articles are active:

Code:
{capture assign=news_there}{news}{/capture}
    {if $news_there}
    <div id="news">
    <h3>News</h3>
    {news}
    </div>
    {/if}


I found this to not be working, like does someone else in my forum post.
viewtopic.php?f=28&t=68592
But from this post, another code resultet which at least in my case, does work:

Code:
{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}

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/