Initialization Functions

These are functions which you can call during the initialization of your plugin to change how your plugin is displayed.

Calls to initialization functions must be made from within your init() method; they will not work when called from your showSlot() method.

You can use syntax of the form:

$this->functionName()

to call an initialization function from anywhere within your Plugin's init() method.

captcha()

This function automatically includes the required JavaScript for a CAPTCHA, and provides you with the HTML code needed to display the CAPTCHA.

checkCaptcha()

This function checks a POST submission to see if a CAPTCHA is correct.

To use it you must have previously included a CAPTCHA on a form using the $this->captcha() initialization function.

forcePageReload()

Allows you to remove your Plugin's ability to reload by AJAX, and force a page reload instead.

headerRedirect()

This takes the Visitor to a different url, either using an actual header redirect, or by using JavaScript if your Plugin is reloading via AJAX.

markSlotAsBeingEdited()

Allows you to tell the CMS that an Admin is currently editing your Plugin.

registerGetRequest()

This function allows you to temporarily modify the canonical URL for the current Content Item.

scrollToTopOfSlot()

Allows you to scroll the Visitor's view to the top of a Slot when a Plugin in that Slot is reloading via AJAX, or to stop any scrolling.

setMenuTitle()

This function allows you to temporarily overwrite the current Menu/Breadcrumb title for the current Content Item.

setPageTitle()

This function allows you to temporarily overwrite the current page title for the current Content Item.

showInEditMode()

Call this function from a library plugin to make that plugin visible in Edit Mode.

showInFloatingBox()

Allows you to show your Plugin in a floating box rather than on the page.

showInMenuMode()

You can call this to indicate that your Plugin should be shown in Menu Mode.