Previously I’ve mentioned the intriguing idea of creating a custom view style for SharePoint 2007. Well, it turns out that instructions exist for how to do this in SharePoint 2003 – but I couldn’t find any for MOSS 2007 or WSS3. Well, it turns out that it’s not really that different, as far as I can see!
The main difference seems to be the location of the VWStyles.xml file. It’s now in:
[12 Hive]TEMPLATEGLOBALXML
Opening this up, we see lots of XML (good job it’s human readable, right?)
Okay let’s modify it and see if we can change a view style. I decided to add some fixed text into a Group Heading, so I opened up the XML and added some text:
Below shows a nicer view of the before and after:
And then when I used this viewstyle on a list, well, my text appeared! Below shows the Default view style and the Basic viewstyle which I changed:
As you can see, that’s a pretty trivial example. You might also have notice the reams of XML involved – and there is a lot. I’d suggest that the MSDN article mentioned at the top is right – it’s probably better to copy and modify a view style than creating your own. I mean, all that CAML – yuck!