IsPinEnabled function

Syntax

IsPinEnabled()

Description

Use the IsPinEnabled function to return a Boolean value indicating whether the Add To (pin) button is enabled on the component.

Important:

Use this function within fluid applications only.

Parameters

None.

Returns

A Boolean value.

Example

If Not (IsPinEnabled()) Or
      %Request.BrowserDeviceFormFactor = %FormFactor_Small Then
   PT_WORK.PT_ADD_TO_HP.Visible = False;
   PT_WORK.PT_ADD_TO_NAVBAR.Visible = False;
   PT_WORK.PT_ADD_TO_FAV.Visible = False;
Else
   AddStyleSheet(StyleSheet.PTNUI_PINTO_CSS);
   AddJavaScript(HTML.PTNUI_PINTO_JS);
   AddOnLoadScript("portalContextNodeURI = '" | getPortalContextNode() | "';");
   PT_WORK.PT_ADD_TO_HP.JavaScriptEvents = "href=""javascript:PTPinTo.SavePin('LP');""";
   PT_WORK.PT_ADD_TO_NAVBAR.JavaScriptEvents = "href=""javascript:PTPinTo.SavePin('NB');""";
   PT_WORK.PT_ADD_TO_FAV.JavaScriptEvents = "href=""javascript:PTPinTo.SavePin('FAV');""";
End-If;