0

I have modified the ContentQueryMain xsl file and want to override it when I deploy. So far it works fine, but I have multiple site collections where I also need to override the ContentQueryMain xsl on those as well.

I have a site collection hierarchy:

  • Root site collection (http://domain/)
    • Sub site collection (http://domain/sites/sitecollection2)
    • Sub site collection (http://domain/sites/sitecollection3)
    • Sub site collection (http://domain/sites/and-so-on)

On my root site collection the xsl file is successfully overridden and works but when I activate the feature overriding the xsl on the other site collections nothing happens. The feature gets successfully activated, yes, but the xsl does not get overridden.

Here's my Module xml:

<Module Name="XSLT" Path="XSLT" Url="Style Library/XSL Style Sheets">
  <File Url="ContentQueryMain.xsl" IgnoreIfAlreadyExists="TRUE" Type="GhostableInLibrary" />
</Module>

The RootWebOnly attribute set to false doesn't change the outcome.

  • Try adding a leading / to your URL – Robert Lindgren Feb 19 '14 at 12:21
0

As I understand it, XSL files for CQWPs need to reside in the Style Library of the site collection they are being used in. I am not a developer so am unclear whether the above means you have deployed the XSL file to the root only or to all site collections.

Have you tried using the ~sitecollection token in the URL parameter?

<Module Name="XSLT" Path="XSLT" Url="~sitecollection/Style Library/XSL Style Sheets">
  <File Url="ContentQueryMain.xsl" IgnoreIfAlreadyExists="TRUE" Type="GhostableInLibrary" />
</Module>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy