Problem in Image Display using Content Query Web Part -- SharePoint 2007
-
Wednesday, April 11, 2012 6:56 PMI have a SharePoint list with one of the column as image column. I want to display the content with image on a different site. I am using Content Query Web part. I am using the Item style as Image on Left but image is not displayed on the page. I am using SharePoint MOSS 2007.
All Replies
-
Friday, April 13, 2012 9:47 AM
Hi Srikanth,
According to your description, I’ve tested the scenario you mentioned. The Image On Left Item Style cannot display the image on the page by the Content Query Web Part. So you have to customize the Content Query Styles to accomplish your requirements. Please follow these steps:
- Find the ItemStyle.xsl in Style Library/XSL style Sheets directory, edit it in the SharePoint designer.
- Add a new xsl template like this:
<xsl:template name="MyCustomStyle" match="Row[@Style='MyCustomStyle']" mode="itemstyle"> <xsl:for-each select="@*"> <xsl:value-of select="@YourImageField" /> </xsl:for-each> </xsl:template>
Please add proper html text to present the Image
- Edit the Content Query Web Part, change the Item Style to the custom style you created.
Please refer to these article to get more information:
Thanks,
Lambda Zhao
TechNet Community Support
- Marked As Answer by Srikanth T Friday, April 13, 2012 1:22 PM
-
Friday, April 13, 2012 1:22 PMThanks Lambda for your help. I added ImgeUrl field to web part also to make it work.

