Recover Your Password

Return to Product Support > Learning Center > Developer References > Creating Add-ons

Creating Add-ons

An Add-on is a data record that contains all the elements necessary to create a feature for a Contensive website. These elements include html, images, javascript, styles, server-side scripting (Jscript, VBScript, php, etc) and others.

Add-ons are packaged and distributed in add-on collections. Collections are compressed files (zip format) that include an xml format collection installation file and all resource files required for the add-on. The collection installation file guides a sites installation of a group of features, which may include one or more add-ons, as well as database indexes, database table descriptions, database records, and others.

An example of an add-on is the 'webcast and podcast' Add-on. When installed, it adds a "webcase" tab to the edit screen for each page. Upload a media file in  that tab and the page displays the file automatically. Download the RSS Feed Add-on and adding this page to the RSS feed will automatically include the necessary entries to make the media file a podcast.

How Add-ons Are Executed

An Add-on can be run several ways. You control this when editing the add-on in the "Placement" tab.

  1. Dropped on a page
    If an add-on is marked "Place on Page" or "Place on Template" it can be added to any page (or template) by any content manager through the wysiwyg editor. An example would be the Personalization Add-on. Administrators drop the add-on on a page and set it to First Name. When a visitor views the page, the add-on is replaced by it's output, in this case the visitor's first name.
  2. Added to every page in several specific locations
    Add-ons can be set to run on every page at the start of the body, end of the body, start of the content or end of the content. Add-ons triggered at the end of the body have programmatic access to all the body content so they can act as filters. An example of this is the tool-tip Add-on. It runs at the end of the body on every page. It reads in the complete body html and modifies it to include tools tips under certain conditions. It returns the modified body to the
  3. As a remote method
    If an add-on is marked as a remote method, it can be called remotely with it's name as the URL. A common example of a remote method add-on is the server-side work required for an ajax method, such as the method used to open folders in the admin navigator.
  4. As a background process
    Any add-on can be executed as a background process. In this case, it's output is discarded. An example of a process add-on is the Contensive Content Spider. Periodically, it is started as a background process. It opens an HTTP interface and fetches a page from the site. It processes the reply from the site to check for errors, and to index the content it finds. There is an example of a process addon in the Add-on Samples collection in the Collection Library. Every minute, it updates the admin site header name.
  5. As a programmatic subroutine
    Any add-on can be called by any other add-on. For instance, the Process Payment add-on can be called from the Shopping Cart Add-on, the MeetingSmart Add-on or any custom add-on that needs to process payments. To make sure the subroutine addon is installed, their should be an importcollection line in the calling collection.