News module doc page

For suggestions and questions regarding CMSMS Core documentation.

Moderator: DIGI3

Locked
User avatar
thomahawk
Power Poster
Power Poster
Posts: 293
Joined: Fri Jul 25, 2008 10:13 am
Location: Zug, Switzerland

News module doc page

Post by thomahawk »

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

Code: Select all

{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.
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}
Locked

Return to “[locked] Documentation”