Pergunta

Is there a simple way to package a CQWP with its required XSL and CSS ( and maybe js) files as a feature?

The scenario I have is that i have some components in a WCM page that are implemented as OOTB CQWP with custom XSL. I have the .webpart file and the XSL files. Can I have these packaged as a feature so that by activating this feature, I get a new web part in the gallery that is already pointing to a list and has the appropriate styles?

I am using SP2010.

Foi útil?

Solução

The easiest way to do this in Visual Studio 2010 is to create a new Module (right click project -> Add New Item -> Module), and place your required files into this Module folder (just drag them in from Explorer).

In the Elements.xml for the Module, you can define which files you want placed where in the site. The Path element points to the location in your project, and the Url element points to where you want the file to end up.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top