Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 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 :)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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