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

As far as i know if i want to add view style for lists or pages on site i have to change the VWSTYLES.XML file and copy one of ViewStyle tag and change the "ID" attribute, and make my changes to it and save the file and finally reset the IIS and done.
So far apparently ok, but when i do all of this and make my changes, nothing is effected on the page.

For example i change the following elements:

<ViewBody ExpandXML="TRUE">
<HTML>
  <![CDATA[
    <td valign="top" width="49%" class="ms-stylebox">
    <table border="0" width="100%" cellspacing="0"><tr class="ms-styleheader">
    <td color="yellow" class="ms-detailhdricon" width="10%"> 
]]></HTML>
...
</ViewBody>

to something like this:

<ViewBody ExpandXML="TRUE">
<HTML>
  <![CDATA[
    <td color="yellow" valign="top" width="49%" class="ms-stylebox">
    change and add some texts.
    <table border="0" width="100%" cellspacing="0"><tr class="ms-styleheader">
    <td color="yellow" class="ms-detailhdricon" width="10%"> 
    change and add some texts.
]]></HTML>
...
</ViewBody>    

Nothing changes and i can't see any of texts that i put on, not on page and even not on view source of the page. I'm using SharePoint 2010. Why and what's happening?

share|improve this question
    
Do you see your newly identified style as one of the available styles at all? Or it's not even in the list of available styles in the UI? –  Sam Yates Jul 26 '11 at 23:10
1  
yeah i can see my newly style was created but when i click ok, it's like i choose "All Items" view and nothing happens. –  Jalali Shakib Jul 28 '11 at 4:17

2 Answers 2

up vote 2 down vote accepted

finally i came to solution.
and it's not so hard.
for creating new View Style that appear on entire farm, we must edit two files on Template folder:
1-VWSTYLES.xml on (TEMPLATE\GLOBAL\XML)
2-vwstyles.xsl on (TEMPLATE\LAYOUTS\XSL)
in xml file we must use the ViewStyle tag that much look like to our needs and copy and paste this tag and make our changes(don't forget set new Id for ViewStyle) and save the xml file.
after that we must find the ViewStyleId section that equals to the Id of ViewStyle on xml file that we just copied, and copy and paste this section in xsl file too and make our changes and finally save the xsl file and run the iisreset command and its done.

share|improve this answer
    
Can you expand on what you are changing in the vwstyles.xsl. I am struggling to see my changes as well. I thought I modified what was needed but still no luck. –  user4803 Sep 14 '11 at 20:08

You need to attach the newly Created View Style to a List or Document Library . For this you need to go to the Style section and select the newly created viewstyle

share|improve this answer
    
I did that but nothing happened. I'm on SharePoint 2010. –  Jalali Shakib Jul 25 '11 at 10:15

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.