roller-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave <snoopd...@gmail.com>
Subject Re: hide empty blogs in directory (on Planet)?
Date Mon, 16 Feb 2009 22:08:47 GMT
On Thu, Feb 12, 2009 at 11:49 AM, Dick Davies
<rasputnik@hellooperator.net> 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

Mime
View raw message