We have started using content query web parts to display our intenal news/announcments via audience targets. Our existing webpart display the news items on our front page in the following way:-
*Image displayed on the left
*Tittle in the middle
*Date created on the top right
I have tried using the default views for the CQWP provided out of the box but cannot get the content query to display anything but the title. I have read some article on how to customise the itemstyle.xsl but still dont quite understand what exact code I need to add to the itemstyle.xsl....Thanks in advance
Microsoft SharePoint
Last Comment
MrNiss99
8/22/2022 - Mon
SCHUMI33
Before you go making any changes to the itemstle.xsl, back it up. I've played around with the CQWP before and included a marquee scroller and fixed size images, different style titles etc etc.
I've attached one of mine here. Download it and have a look. Hope it helps. ItemStyle-NewV2.xsl
SCHUMI33
Note: Rename the old ItemStyle.xsl. You'll need to rename the attached new file to 'ItemStyle.xsl' and then run IISReset.
MrNiss99
ASKER
hey SCHUMI33,
thanks for that, I have tested your ItemStyle.xsl but it still doesnt display the images. I get the title & creation date but none of the images are displayed....
Go into 'Modify Shared Web Part' for the CQWP. Under the style tab expand it. Then select the option "AnnouncementiwthImage&Body" Under the 'Item Style' heading.
MrNiss99
ASKER
Hey SCHUMI33, I had applied the syle correctly.....
SCHUMI33
I noticed I didn't attach the webpart file. I thought I had as well as the ItemStyle.xsl. I am at home at the moment. I'll post the web part file in the morning. Cheers.
I've attached one of mine here. Download it and have a look. Hope it helps.