SharePoint 2013 CTX variable and its function part 3

This is my third post of "SharePoint 2013 CTX variable and its function" series 

Other Utility Functions

  • Srch.U.isTableTypeof(resultTable, tableTypeName): Indicates whether the given table matches tableTypeName.
  • Srch.U.isSubstrateTable(resultTable): true if the table is a substrate table; false otherwise
  • Srch.U.isSPFSKU():true if the host is a SharePoint Foundation; false otherwise.
  • Srch.U.isSameHost(url, hostname): Indicates whether the given URL contains the same hostname.
  • Srch.U.isRTL():Indicates whether the document has the RTL attribute.
  • Srch.U.isProtocolAllowed(value): true if the URL uses a supported protocol; otherwise, false.
  • Srch.U.isPrimitive: Indicates whether the given object is a function, complex project.
  • Srch.U.getSingleHHXMLNodeValue(xmlDoc, nodeName): Gets a single hit-highlighted XML node.
  • Srch.U.isPageInMSdMOde():Indicates whether the current page is in MDS(minimal Download Strategy mode) mode.
  • Srch.U.isPageInEditMode():Indicates whether the current page is in edit mode.
  • Srch.U.isIntentTable(resultTable):Indicates whether the specified table is an intent table. true if the table is an intent table; false otherwise.
  • intent lock are : Used to establish a lock hierarchy. 
  • The types of intent locks are: intent shared (IS), intent exclusive (IX), and shared with intent exclusive (SIX).
  • Srch.U.isFirstRankedBlock(resultTable): Indicates whether the first result in the result table is ranked.
  • Srch.U.isFirstPromotedBlock(resultTable):Indicates whether the first result in the result table is promoted.
  • Srch.U.isEnterKey(keyCode): Indicates whether the specified key code is the Enter button’s code or not. true if the key code is not null and equal to the ‘\r’ or ‘\n’ character; false otherwise.
  • Srch.U.isDefaultSiteSearchPage():Indicates whether the current page is the default site search page (osssearchresults.aspx).true if the page is the default site search page; false otherwise. 
  • Srch.U.includeScript(templateLink, relativeLink) : Registers the script.
  • $includeScript(this.url, "~sitecollection/_catalogs/masterpage/tests/script1.js");
    Or Srch.U.includeScript(this.url, "~sitecollection/_catalogs/masterpage/tests/script1.js");
  • Srch.U.includeCSS(templateLink, relativeLink): Registers the CSS.
  • $includeCSS (this.url, "~sitecollection/_catalogs/masterpage/tests/test.css");
    Srch.U.includeCSS (this.url, "~sitecollection/_catalogs/masterpage/tests/test1.css");
  • Srch.U.hideElement(element):Hides the given DOM element by setting its display attribute to hidden.
  • Srch.U.showElement (element):Visible the given DOM element.
  • Srch.U.getWorkspace(fallback) : Gets the default workspace (s4-workspace) element.The default workspace. If no default workspace is available, the fallback element will be returned.
  • Srch.U.getUnEncodedMultiValuedResults :Gets a trimmed string that is un-encoded containing multi-valued results.
  • Srch.U.getTrimmedProcessedHHXMLString(value, cutOff): Trims the hit-highlighted string; adds an ellipsis at the end if required.The truncated result if the given string is longer than the cut off value; otherwise the same string will be returned.
  • Srch.U.getTableProperty(parent, propName): Gets the given property value from a property bag.
  • Srch.U.getTableOfType(tableCollection, tableTypeName): Gets the first table of the given type in a result table collection.

Comments

Popular posts from this blog

SharePoint RPC Protocols Examples Using OWSSVR.DLL

Send Email using SharePoint Rest API

Query suggestions in SP 2013 Using Rest API (/_api/search/suggest)