<%args> $Topic $Class => 0 % if ($Link) { \ % } <% $Topic->Name() || loc("(no name)") %>\ % if ($Topic->Description) { : <% $Topic->Description %> % } % if ( $Articles->Count ) { (<&|/l, $Articles->Count &>[quant,_1,article]) % } % if ($Link) { % } <%init> my $Articles = RT::ObjectTopics->new( $session{'CurrentUser'} ); $Articles->Limit( FIELD => 'ObjectType', VALUE => 'RT::Article' ); $Articles->Limit( FIELD => 'Topic', VALUE => $Topic->Id ); my $Link = $Topic->Children->Count || $Articles->Count;