Page 1 of 1

Bulletproof: Position of category images?

Posted: Mon Oct 01, 2007 9:05 am
by derlinzer
I'd like to position the caterogy image for each post right next to a post's title and not within the post body.

Can someone tell me, where i have to edit the bulletproof template to achieve that?

Posted: Mon Oct 01, 2007 9:09 pm
by Don Chambers
You need to modify entries.tpl. This is the entry title:

Code: Select all

<h4 class="serendipity_title"><a href="{$entry.link}">{$entry.title}</a></h4>
This is the category icon:

Code: Select all

{if $entry.categories}
    <span class="serendipity_entryIcon">
        {foreach from=$entry.categories item="entry_category"}
             {if $entry_category.category_icon}
                <a href="{$entry_category.category_link}"><img class="serendipity_entryIcon" title="{$entry_category.category_name|@escape}{$entry_category.category_description|@emptyPrefix}" alt="{$entry_category.category_name|@escape}" src="{$entry_category.category_icon}" /></a>
            {/if}
        {/foreach}
   </span>
{/if}
You could relocate the icon to just before, or just after, the title.

Posted: Mon Oct 01, 2007 9:57 pm
by yellowled
Don Chambers wrote:You could relocate the icon to just before, or just after, the title.
Please note (derlinzer, not Don; Don should already know this :)) that you'll probably have to patch the entries.tpl with this every time BP is updated.

YL

Posted: Tue Oct 02, 2007 2:40 am
by Don Chambers
yellowled wrote:
Don Chambers wrote:You could relocate the icon to just before, or just after, the title.
Please note (derlinzer, not Don; Don should already know this :)) that you'll probably have to patch the entries.tpl with this every time BP is updated.

YL
Yes - obviously Don (me) knows this :wink: - however, I think it is a good idea to mention it, as I should have in my original reply.... I'll take it a bit further.... The file will not need to be patched with EVERY BP update - only those updates that actually modify entries.tpl.

Posted: Fri Oct 05, 2007 12:31 pm
by yellowled
Don Chambers wrote:The file will not need to be patched with EVERY BP update - only those updates that actually modify entries.tpl.
Well, that - let's nitpick a little - is only the case if the person updating remembers not to update the not-modified entries.tpl :)

YL