On Thu, Feb 12, 2009 at 11:49 AM, Dick Davies
<[email protected]> wrote:
> Someone asked me if there is a way to hide empty weblogs in our directory.
>
> I had a look through the template guide and can see velocity methods like
> $weblog.active, getMostCommentedWeblogs and getHotWeblogs(), but nothing
> that fits my requirements.
>
> Have I missed something, and if not, how much work is it to define my
> own method like the ones above?
The Weblog object has getEntryCount() and getCommentCount() methods
that you can use to do this.
i.e.
#if( $weblog.entryCount > 0)
<-- show that weblog -->
#end
- Dave