Question

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.

Was it helpful?

Solution

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

OTHER TIPS

Consider uploading them to "Style Library" in the root of the site collection.

If you don't have a "Style Library" at the root, consider making one -- it's just a document library.

Make sure the permissions are set correctly so everyone who needs to read it can.

You can reference them using "/Style%20Library/my.css" but this won't work on site collections that don't live at the root of the domain.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top