This project is read-only.

Thumbnails on post list

Topics: Enhanced Blog Edition
Mar 9, 2012 at 12:50 AM

I'm attempting to have a thumbnail image appear next to the post title on the Blog front page, but am not a coder at all so am getting really stuck.

I'm thinking I need to somehow reference the list where the photos are stored but am not sure how to tie it to the particular post.

Anyone done something similiar and can lend me a hand?


Thanks in advance

Mar 26, 2012 at 10:40 AM
Edited Mar 26, 2012 at 1:05 PM

Hi, Looking for the same!

I've built a list with a picture column and have tried to connect it to my theme's postlist. without any success. I think one have to load all xsl params from allposts first, because defining xsl:value-of name="picture" won't work. Only title and dates are loaded.

anyone able to load specific column information in postlist?

Mar 28, 2012 at 1:39 PM

got it!

when your ebe is runnin correctly, and you want to use your own theme you can load FieldRefs from you BlogList to work with.

Open yout blogsite in Sharepoint Designer. In home.aspx you have the Transfrom-XslName statement. Click on it and see the "tagproperties"

Here is a setof viewFieldsXML, where all the fields from your list will get loaded. 

<FieldRef Name='Title'/><FieldRef Name='Picture'/><FieldRef Name='ID'/><FieldRef Name='Author'/>
<FieldRef Name='Body'/><FieldRef Name='NumComments'/><FieldRef Name='PublishedDate'/>

all you have to do now, is to type your column-name into it (as you can see my 2nd FieldRef "Picture")

In postlist.xsl you're able to call:

<xsl:value-of select="substring-before(Picture,',')" />
at any place you want. just wrap it with some img src attributes and you're the winner