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 -->
<li>
<b:if cond='data:blog.url == data:label.url'>
<span expr:dir='data:blog.languageDirection'>
<data:label.name/></span>
<b:else/><a expr:dir='data:blog.languageDirection' expr:href='data:label.url'>
<data:label.name/>
</a>
</b:if>
<span dir='ltr'>
(<data:label.count/>)</span> </li>
</b:if><!-- and this one -->
</b:loop>
</ul>
<b:include name='quickedit'/>
</div>

0 comments: