Bulletproof: Position of category images?

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
derlinzer
Regular
Posts: 24
Joined: Mon Sep 03, 2007 3:12 pm
Location: Linz, Austria
Contact:

Bulletproof: Position of category images?

Post 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?
Giving S9y a try...
Image
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post 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.
=Don=
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Post 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
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Post 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.
=Don=
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Post 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
Post Reply