We're currently building a sharepoint 2013 site but the need to create a custom view style has now become apparent. When viewing documents, the following features would be ideal:

  • The ability to specify conditional colour values based off dropdown values.
  • The ability to add additional styles to a list view - table padding etc.
  • The ability to show additional content to a list view - table headings etc.

As a short term solution we've enabled a thumbnail image to be chosen when a document is added, but this is less than ideal - especially for the client.

We can't seem to find any documentation on how to create a custom view style anywhere so your knowledge would be greatly appreciated.


P.S I should note that:

  • We only have access to Sharepoint Designer 2013 and not 2010.
  • We cannot use any external JS libaries.

2 Answers 2


You can use JavaScript for that, a new property called "JSLink" is introduced in SharePoint 2013 list view webpart properties. Write a JavaScript inserting html on a conditional basis can solve your problem.

  • Does this reference external JS files to function properly? Or can this be implemented solely using local files?
    – Chuck
    Sep 23, 2014 at 15:47
  • Yes, you can create external js and upload it to master page gallery or in site content. Do care while mentioning url in JSLink property. As it contain ~sitecollection or ~site, so take care of it.
    – ateet
    Sep 23, 2014 at 16:08

You can have a try with below jquery if it helps you for checking the values and updating the row colors:

<script type="text/javascript">
$(document).ready(function () {
    $Text = $("td.ms-cellstyle.ms-vb2:contains('Open')");
    $Text.parent().css("background-color", "#FF9900");

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.