In this post going to show you some of the useful Utility Functions that might be useful for you while working with search display template. I used most of the functions MSDN Link: https://msdn.microsoft.com/EN-US/library/office/dn768285.aspx CTX Function Part 2 CTX Function Part 3 CTX: In Display template CTX variable is responsible for returning the all the managed properties and other DOM elements. Utility Functions String Functions: For checking Null, Undefined & empty values Srch.U.w(str): Indicates whether the given string is null, undefined, or empty. $isNull(str): Checking for Null Srch.U.n(str): Indicates whether the given object is null or undefined. $isEmptyString(str) : Checking for an empty string Srch.U.e(str): Indicates whether the string is null or empty. Array Functions: Split & other array related operations Srch.U.getArray(property): Splits the string into an array of strings using the semi colon (";") as a s...
Comments
Post a Comment