0

Using sharepoint feature I need to overwrite the Itemstyle.xsl file. Since itemstyle content would be chagned frequently this option needed.

Can anyone help me out?

1 Answer 1

1

You need create a Module in Visual Studio in which you add your customized ItemStyle.xslt. In the Module's XML file you write the following;

Example:

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

That should do the trick.

Remember! If you change anything in this file using SharePoint designer, the ItemStyle.xslt will be removed from Site Definition, meaning you can no longer overwrite it by deploying your wsp. How ever you can reverse this by right-clicking on it in SharePoint Designer and choose "Reset to Site Definition".

Hope this helps :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.