Pergunta

I'm working in SharePoint 2010 Server and creating custom content query web parts (CQWP) that point to custom ItemStyle_myTemplates.xsl file. To do this, I've been creating the CQWP in the browser by adding a default CQWP and changing the Query piece. Then I export the CQWP to file on my local machine, edit various settings (add custom columns to CommonViewFields, etc.) and import back into SharePoint.

However, during the import, it appears under the Imported folder; it doesn't become part of the web part gallery. I then test it, export, import again. Is there a better way of doing this? How do you upload a CQWP to make it part of the web part gallery? Is it possible to do any of this in Designer? It won't let me open the publishing page that contains the CQWP, giving the message: This page cannot be edited in SharePoint Designer. You can edit the content in the browser, or edit the corresponding page layout in SharePoint Designer.

Your help is appreciated. Thanks.

Foi útil?

Solução

To add your configured web part to the web part gallery, go to Site Settings and then to the web part gallery. You can then upload your .webpart file - the gallery behaves like a normal document library.

This is fine for one-off or occasional use. To do this in a repeatable way you would need to develop a feature, to deploy the webpart definition to the gallery, in Visual Studio, for that professional touch.

You can't open a publishing page in SharePoint Designer because it isn't really a page as such, just a list item. You can edit the associated page layout in SPD. If you want to edit the page content you need to do it in the browser.

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