Saturday, February 28, 2009

Blogger: show labels only when occurrences exceed x

(even wat techneut geneut)
If you only want your labels to show up when there are more than, say, 3 occurences, you can adapt the the Layout in HTML. Be sure to tick the "Expand Widget Templates" mode of the Edit HTML page, and add the lines in bold to the labels widget.
<div class='widget-content'>
<ul><b:loop values='data:labels' var='label'>
<b:if cond='data:label.count > 3'> <!-- this one -->
<b:if cond='data:blog.url == data:label.url'>
<span expr:dir='data:blog.languageDirection'>
<b:else/><a expr:dir='data:blog.languageDirection' expr:href='data:label.url'>
<span dir='ltr'>
(<data:label.count/>)</span> </li>
</b:if><!-- and this one -->
<b:include name='quickedit'/>