Alert This post is over a year old, some of this information may be out of date.

Watch out when you move display templates from Office 365 to On-premises

Today I was creating my session for SharePoint Saturday Belgium and Paris. For my demo’s I prepared a couple of display templates that were created on Office 365 / SharePoint Online. To be sure that I had a backup plan, I moved all these display templates to my development environment on-premises.

The first thing I got after I configured the web parts were errors like this:

Show image $urlHtmlEncodeString is not defined
$urlHtmlEncodeString is not defined

As it turns out, the $urlHtmlEncodeString function does only exist for SharePoint Online at the moment.

Available on Office 365: $ urlHtmlEncode, $urlHtmlEncodeString, $urlHtmlEncodeValueObject

Available on On-premises: $urlHtmlEncode

It could be that there are other functions which you cannot use on-premises. Feel free to provide me feedback if you experienced something similar.

Comments

Back to top