Page 1 of 1

Display image in the title

Posted: Mon Nov 21, 2005 4:46 pm
by Jr Prod
Hi everybody,

I would like to display an image near to the title. But it wouldn't be an image assiciated to a category but a different image for each note.
I don't have any idea how to do that, so thanks for any clue. :D

Jr Prod
___________________________
http://www.fosenbauer.com/blog

Re: Display image in the title

Posted: Mon Nov 21, 2005 7:24 pm
by garvinhicking
Try to edit your entries.tpl template, there you can insert any HTML you like. Or use CSS and the background-image property to style elements.

Regards,
Garvin

Posted: Tue Nov 22, 2005 12:09 am
by MySchizoBuddy
u can also use the customs fields thingy right. so every post u can assign a new image

Posted: Tue Nov 22, 2005 11:42 am
by JrProd
Try to edit your entries.tpl template
Yep, but if I do this, all my entries will have the image near to the title. My wish is that only entries that talk about argentina would have a little flag near to the title...
use the customs fields thingy right
That sounds nice. Where can I find this. Is that a plugin or is there an option in the sending formular ?

Thanks
___________________________
http://www.fosenbauer.com/blog

Posted: Tue Nov 22, 2005 11:44 am
by garvinhicking

Posted: Tue Nov 22, 2005 1:08 pm
by JrProd
OK, thanks a lot, I'll try that :D

Regards,
Jr Prod

Posted: Tue Nov 22, 2005 11:03 pm
by MySchizoBuddy
ok here is the solution. :)

First open up entries.tpl (don't change the default entries.tpl, copy one to ur template folder and change that) and find this line

Code: Select all

        <h4 class="serendipity_title"><a href="{$entry.link}">{$entry.title}</a></h4>
replace it with this line

Code: Select all

                <h4 class="serendipity_title"><img src="{$entry.properties.ep_icon}" /><a href="{$entry.link}">{$entry.title}</a></h4>
Now install "Extended properties for entries" and type this in your custom fields.
Image

then when u make a new post u just type in the url of the flag
Image

thats it, ur done.
now if u don't provide a url then a question mark appears. there is a way to detect if a smarty field is empty of not, garvin might know that.
if not then i'll look into it more. u could just call the whole <img> tag as a field that way u don't have to worry about the question amrk.

try it out and let me know.

I'm in LOVE with this custom fields thingy. :oops: