Skip to main content

Cloud

Updating the styles of the Content Query Web Part

Ah the content query web part (CQWP)… what a great web part. There are some great articles here and here about how to customize the web part look and feel. My only problem with these approaches is that they use SharePoint designer 2007 to interact with the itemstyle.xsl stylesheet. What happens if you want to automate the process of updating this stylesheet because you have multiple environments that need a change? After some poking around I found that this file lives in the content database in the AllDocs table.

If you run the SQL statement "select * from AllDocs where LeafName = ‘itemstyle.xsl’" in a content database, you will see all of entries for that file, one for each site collection in that content database.

Now the big question is how to automate, without directly updating the database because we all know that is a big no-no in SharePoint, the process of updating this file across many environments. If anyone out there knows of a way, please let me know. In the mean time, it’s off to the world of creating custom stsadm commands. Stay tuned here for the results of my efforts.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

PointBridge Blogs

More from this Author

Follow Us