tags:

views:

2438

answers:

3

I've created a custom list, and made some changes to the way the CQWP renders it on a page by modifying ItemStyle.xsl. However, I'd like to use some custom css classes and therefore I'd like to link to my own custom .css file from the head tag of the pages containing this CQWP.

So my question is, where to do put my .css file and how do I link it properly to a page containing the CQWPs. Please have in mind that I'm making a solution that should be deployed on multi sharepoint installations.

Thanks.

A: 
Hafthor
A: 

Alright, that makes sense. But how to I actually link to them in a proper way. Preferably one that works when deploying the solution. Perhaps some magic when you activate a feature, or something like that.

+2  A: 

The microsoft official way is just to copy them into the relevant folders (as seen by downloading their template packs). However, you could also create your own site definition and add the items to the correct libraries and lists in the same way that the master pages are added.

If you are going to deploy CSS and Master Pages through features remember you will have to activate your the publishing infrastructure on the site collection and the publishing feature on the site.

To deploy a master page/page layout as a feature you should follow the steps at the site below, you can use the "fileurl" element to specify your CSS and place it into the correct folder (style library, for example): http://www.sharepointnutsandbolts.com/2007/04/deploying-master-pages-and-page-layouts.html

Mauro