The Content Query WebPart can only take you so far when it comes to how you want to display your results. Sometimes you want to create a SharePoint Image Slideshow or a metrics “stoplight” dashboard for your executive level. Sometimes you’d like to include JavaScript/jQuery functions within your results. The SharePoint 2010 query layouts can be modified but you have to put in a little bit of work to make sure it works as expected.
Go ahead and crack open SharePoint Designer 2007/2010 and read along to Heathers blog. She takes you through the paces of creating your layout and style to displaying it on the page correctly.
Heather Solomon Blog
Some tips when developing
- Make sure you work in a separate environment than you where you plan to use the new layout. All Content Query WebParts (CQWP) share the same file. Making a mistake is share across all CQWP.
- Test as you go and don’t build everything at once. Make sure it works first.
- Use existing templates as references when creating a new one. Notice naming conventions and sometimes upper and lower case letters.
- Check-In the ItemStyle to help preview the changes live
- Don’t forget to Check-In > Publish > and Approve
Resources
- http://heathersolomon.com/blog/articles/CustomItemStyle.aspx
- http://blogs.msdn.com/b/ecm/archive/2006/10/25/configuring-and-customizing-the-content-query-web-part.aspx