This project is read-only.

Adding a field to the blog entry

Topics: Controls, Themes
Mar 5, 2009 at 7:15 PM
I have a client who needs an image for each blog... problem is, they need to format it so that the content and title are all to the right of the image.
This means that the image can't be part of the content.

I need to make an "image" field that I can basically treat the same as I would a "Title" field... e.g. just drop the code on teh page where it should appear.

The layout will be like this:
=        image    |  title                                        =
=                     | author/date                             =
=                     | article text, etc                        =

Crude, but you get my point... if the image is part of the text, there is no way to lay it out like this.

I've looked at the code, and looks like it would be simple to enhance the XML provider to accomodate such a field.
Before I did that though, I wanted to see if anyone else had already done the same thing.

Mar 14, 2009 at 1:11 AM
I'm sure someone else has a better idea but since people are busy, I'll put in my 2 cents.

I had a similar requirement and ended up modifying the core. I had to add a new property to the the Post class - in you case, Image property.

I hope this helps.

Mar 14, 2009 at 7:26 PM
I ended up doing exactly the same thing...

I also ended up modifying the posts file a bit so that I could make it use different templates for teh first post, and all other posts, as well as the post details...

Thanks much.