Icon next to article title if specific tag is set
Posted: Mon Dec 01, 2008 11:02 am
I want to display a small icon next to the article title if a specific tag is set (freetag plugin). I currently insert the icon manually in my blog body, but it would be more flexible and clean if I could insert the icon globally.
Can you give me a hint on how to do this within my template? How can I check if a tag is set?
Can you give me a hint on how to do this within my template? How can I check if a tag is set?
Code: Select all
<div class="serendipity_entry serendipity_entry_author_{$entry.author|@makeFilen
ame} {if $entry.is_entry_owner}serendipity_entry_author_self{/if} ">
{if $entry.tags contain "my_tag"}
// ... insert image ...
{/if}
<h4 class="serendipity_title"><a href="{$entry.link}">{$entry.title|@def
ault:$entry.body|truncate:200:" ..."}</a></h4>
<div class="serendipity_entry_body">
{...}