SharePoint Display Templates – Display Enhanced Rich Text Field

In using some of the Display Templates, I noted that the Rich Text Content was being rendered as text … including all tags, etc.  I wanted to make sure my display templates rendered them as Rich Text Content.

Achieving this is fairly simple: Simply replace this

<div class="cbs-Line2 ms-noWrap" title="_#= $htmlEncode(line2.defaultValueRenderer(line4)) =#_" id="_#= line4Id =#_">
_#= line4 =#_

with this

<div title="_#= $htmlEncode(line4.defaultValueRenderer(line4)) =#_" id="_#= line4Id =#_">
_#= STSHtmlDecode(line4.value) =#_

(Replace the “_#= line4 =#_” with “_#= STSHtmlDecode(line4.value) =#_”). Also, to help ensure the content wraps correctly, please remove “class=”cbs-Line2 ms-noWrap” from the div in front (not all display templates may have this).

Posted in SharePoint 2013 | Tagged , , | 1 Comment

SharePoint Slider – Search Results Webpart Template

I wanted a slider that looked a little different than the out-of-the-box one you can use with the content by search web part.  Finding this Article by Sharegate’s Yohan Belval proofed to be just the ticket.  I changed the CSS a little to adjust for larger images and modified the display template to point the path for the image to an additional URL site column I pulled into the library (I wanted to point to other websites, not the image display form …)

Please note the display template pulls the description field in by default, not the title.

Here is the section in the display template that I changed (see specifically the “‘URL’:’URLOWSURLH'” at the end of the section):

<mso:ManagedPropertyMapping msdt:dt="string">'Title':'Title','Path':'Path','Description':'Description','EditorOWSUSER':'EditorOWSUSER','LastModifiedTime':'LastModifiedTime','CollapsingStatus':'CollapsingStatus','DocId':'DocId','HitHighlightedSummary':'HitHighlightedSummary','HitHighlightedProperties':'HitHighlightedProperties','FileExtension':'FileExtension','ViewsLifeTime':'ViewsLifeTime','ParentLink':'ParentLink','FileType':'FileType','IsContainer':'IsContainer','SecondaryFileExtension':'SecondaryFileExtension','DisplayAuthor':'DisplayAuthor','PictureHeight':'PictureHeight','PictureWidth':'PictureWidth','ImageDateCreated':'ImageDateCreated','PictureThumbnailURL':'PictureThumbnailURL','PictureURL':'PictureURL','URL':'URLOWSURLH'
Posted in SharePoint 2013 | Tagged , , , , | Leave a comment

Expand long list forms without using “Show More”

The SharePoint 2013 Tasks list didn’t show all fields. Instead one had to click “Show More” in order to see the complete set of fields to be updated. 

When creating the list, I wouldn’t have selected the fields if I didn’t think users should actually fill them out 🙂 , so I wanted to show the whole list by default.  I found this helpful discussion thread about a script that can be added to the Display or Edit Form page to show all data.  … just added a Content Editor web part and pointed to my script (I saved it in a library) and it worked like a charm 🙂

<script type="text/javascript">
    (function () {
Posted in SharePoint 2013 | Tagged , , , , | 2 Comments

Show “Ratings” field in DVWP to a “Read” Permissions Audience

I recently created a filtered webpart page with a number of data view web parts (DVWP), that showed the Ratings field.  I wanted to show Ratings with the default star layout that shows natively in library and list views.  When attempting to view the resulting page with Read privileges, the page threw a permissions error although I had read permissions to all lists and libraries underlying my DVWPs.

After validating correct permission settings for my libraries and lists as well as for the webpart pages and styles libraries, I narrowed the problem down to the “Ratings” field.

Filtered Webpart Page with DVWPs showing Ratings

Filtered Webpart Page with DVWPs showing Ratings

To render the “Ratings” field to the DVWP, I had changed the field format to List Form Field.  This appeared to be the only way to show the stars.  (see image below)

SharePoint Designer "Ratings" Field DVWP - show as "Stars"

SharePoint Designer “Ratings” Field DVWP – show as “Stars”

Here is the resulting code:

Ratings field code - List Form Field

Ratings field code – List Form Field

Unfortunately, showing the Stars in this way caused the page to be inaccessible because list form fields require contribute privileges.  To change this to a display field, I deleted the =”Edit” after controlmode (highlighted in code above) to =”Display”.

Controlmode Intellisense Selector

Controlmode Intellisense Selector

This allows users with Read permissions to view the page and still allows them to rate content.

Posted in SharePoint 2010 | Tagged , | 1 Comment

Incorporate Ratings in your search results page

I wanted to enhance the search results of my support site to show the ratings field as well. I came upon this fantastic blog article by Steve Peschka. … worked very well.

Steve references an older name of the Ratings field.  Today this should be “ows_RatingsAverage”.

I didn’t see the Ratings Images, which are referenced in the article, in the default images provided by SharePoint.  I created them.  Feel free to copy them:

RatingsFilled.png RatingsHalf.png

Here is what the end-result looks like:

Sample Search Results Page

Sample Search Results Page

Posted in SharePoint 2010 | Tagged , , | 3 Comments

Use SharePoint 2010 Organization Browser in another Web Application

The SharePoint Organizational browser natively works only in the web application where the Profiles are found (typically MySites).  I found this blog by TCSC that highlights how the organization browser might be added to another web application.  I have admittedly not tried this out, but thought this might come in very helpful in future …

Posted in SharePoint 2010 | Tagged , | Leave a comment

Insert Document Icon into DVWP

I found this post on Marc D. Anderson’s Blog that illustrates how to insert the document icon into the DVWP before the name of a document.  Very simply, you just insert 

<img alt="Type" src="/_layouts/images/{ddwrt:MapToIcon('', ddwrt:GetFileExtension(string(@FileLeafRef)))}"/>

before the code of the document name.

… if all things could be that easy … 🙂

Posted in SharePoint 2010, Web Design | Tagged , , | 1 Comment

SharePoint 2010 – Create an Orderable List

I wanted to create a list I could order, that is where if I changed the 5th item to 1st place, the remaining items would automatically reorder themselves around it.  After much digging, I found the following solution (cobbled together from various posts …)

  1. Create a Custom List and save it as a template (List Settings > Save List as template)
  2. Go to the List Template Gallery of your Site Collection and download the template (.stp file) to your computer.
  3. Rename the .stp file to a “cab” extension
  4. Open the cab file
  5. Extract the “Manifest.xml” file
  6. Find the List element (it is the first element inside the UserLists element) and add OrderedList=TRUE” as an attribute. (Thanks Matthew Kendall).  Save the file
  7. Repackage the manfest.xml into a .cab file (various tools exist for purchase or for free (I used CAB Explorer Freeware))
  8. Change the file extension on the cab file back to .stp
  9. Upload the modified Site Template file to site templates
  10. Create a new list based on the template

As a final step, let’s add the Order Icon to the Ribbon UI (for detailed instructions please also see “Adding Custom Actions to the Ribbon UI in SharePoint 2010 Using SharePoint Designer 2010)

  1. Open the list in SharePoint Designer (Lists and Libraries)
  2. In the ribbon, in the New Group, select the “Custom Actions” drop-down and select “View Ribbon”
  3. Provide a name (e.g. Custom Order)
  4. Click on “Navigate to URL” and enter the following URL: YourSiteURL/_layouts/Reorder.aspx?List=YourListGUID.  (You can copy the list GUID by opening the list in the browser and clicking on List Settings in the Ribbon; copy the GUID after the “List=” in the URL)
  5. Add the small and large icon (I opened a links list and copied the icon found there in the Ribbon).
    Link that allows you to access the list order page

    Link that allows you to access the list order page

    Page that allows you to order the list items

    Page that allows you to order the list items

This should do it … enjoy 🙂

Posted in SharePoint 2010, Web Design | Tagged , , | Leave a comment

Sharing Themes for SharePoint 2007 – Enjoy!

I love SharePoint … I really do, but the designs leave something to be desired. Most of us know that. In an effort to improve this, I created new designs  that (IMHO) are cleaner and more beautiful than the OOTB SharePoint Themes. I  will load them here for you to deploy “as is” or to customize further.  They are yours to do with as you please.


Here are some screenshots of a demo site where I used the themes:

Urban Sky

Urban Sky Theme

Urban Sky w/Chrome

Urban Sky w/Chrome Theme

Southwest Theme

Southwest Theme


I was doing this on my own time and didn’t want to start from scratch, so I  began by selecting a theme that had good “bones”.  Good bones in this case doesn’t mean beautiful, but rather nice, simple and neutral background color that suited my design.

Two of my themes (which are really variations on a theme) (Urban Sky and  Urban Sky w/Chrome) started with the “Petal” theme (frankly one of the ugliest  themes out there – but the grey background is great!).  The other theme  (Southwest) started with the Vintage theme (lovely undertones of sage-green – perfect for something with a Southwestern theme).

For the two Petal-based Urban Sky themes I decided to replace almost all the  hideous pink with turquoise hues with similar values (similar depth of color).  I opened the Petal CSS and with SharePoint Designer 2007’s “Manage Styles” Task  Pane identified the varying pink hues.  I would select a corresponding  turquoise, and performed “find and replace” against that hue’s Hex code in the entire CSS  file.  I also removed almost all images referenced by the theme (searched  for .gif and replaced the image with “none”).  Please note, I did look at all classes referencing images to help ensure I didn’t delete something I really liked.  Finally I reviewed the resulting look and feel on a number of pages and made additional modifications (e.g. left-hand navigation) to get the result I wanted.

For the “Vintage”-based Southwest theme I took a similar but slightly faster approach.  The Vintage theme already incorporated some nice colors, which I kept.


For months I “deployed” this by applying the Petal or Vintage theme to the site, replacing the CSS and placing and modifying the image links (where necessary).  I had created a library with the files and instructions, so others in the organization could do this too (there is really only one other resource – but at least it was there).  I was fully aware this wasn’t the MS supported way of doing this.  Well, the use of these “themes” grew (practically all new sites seem to use them now) and the fact that I might have to go into each one of the sites to replace the theme became a bit daunting (after all unsupported translates into “might be overwritten” w/upgrades, etc. (unlikely but possible)). It became clear I needed a more sound approach.

This blog post by SharePoint Solutions by HG concisely details how to deploy the themes to the 12-hive on the SharePoint server.  Obviously, wherever the writer references the “Granite” theme, you will want to replace that with either “Petal” (Urban Sky themes) or “Vintage” (Southwest Themes).  Replace the Theme.css file content with the CSS provided at the end of this post.  I placed the images for the “Urban Sky w/Chrome” and “Southwest” themes into the same folder as the .inf file.  Please note that the blog references the need to reset IIS.  In my experience this was not necessary (which is good, because I am not permitted to do that where I work :)).

Appreciative shout-out to Dan Amaro from Klarinet Solutions who provided me with the link to the blog post above on how to deploy this!

Download Files

Posted in SharePoint 2007, Web Design | Tagged , , , , | Leave a comment

Wonderful resource for icons

You must have been there before: you are designing a site. You want it to be easy-to-use, intuitive, and beautiful. If only you could add some icons to make things more usable … but, you don’t have the budget to come up with fancy graphical designs. Enter My Sites My Way icons. They are free and there are many of them in many different designs. Take a look and check it out. I love them!

Here are some small previews (go to the site to see them full size)

Icons - Screenshot



Posted in Web Design | Tagged , | Leave a comment