This is the login panel

 

Home|Account

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

Add-on Arguments

The Add-on Arguments are name/value pairs you configure in the features tab of the add-on record when it is created. Then content managers can modify the value when the add-on is used.

For instance, the "Page Content Review" add-on has two arguments, 'Review after this many days' and 'Rows per page'. They are entered in the Add-on record as follows:

Review after this many days=90
Rows per page=50

When a content manager drops this addon on a page, the default value shown are used. If they turn on advanced edit and click the options icon, they can modify these values.

Argument Syntax

The argument list is a list of name=value pairs, separated by carriage returns.

Name

can not contain a carriage return or an equal sign. See the list of escape codes below.

Value

The value can be a simple string or a Value-Constructor. A value-constructor is a sequence of instructions that sets up selection options for the content manager, and returns only the selected values to the add-on. See the list of escape codes below

Value-Constructors

Name=Default[OptionList]InputType

Name is a reserved option name that the Add-on recognizes. You program the Add-on by providing values for the name options.

Default is the default value used before the add-on options have been modified

OptionList is a list of available options in square brackets, each option is separated by a vertical bar character "|". For instance

My Value = C[A|B|C]

Creates a select box next to the caption "My Value", with the options A, B or C. By default, C is selected

InputType is the method of displaying the input or options. For example, checkbox or select. Currently, these are supported:

  • text
  • select
  • checkbox
  • radiobox
  • resourcelink
  • link
An Option can also be a function

Option Value Functions

To generate an OptionList from a database table, use the List( contentName ) and ListID( contentName ) functions in the option list

List( contentName, optional criteria )

The List function creates a list of names from a content table. The optional Criteria is an sql compatible criteria statement. When a selection is made, the name of the content record is returned.

For example:

GroupName=staff[List(groups)]

When a content manager drops this on a page and edits the options, this option string will produce a drop down selector with all the groups in the Groups content. By default, the group staff will be selected. When the administrator selects one of the groups, it will replace "staff" in the instance of the Add-on on the page.

ListID( contentName )

Returns a drop down select list of names from an database content. The optional Criteria is an sql compatible criteria statement. When a selection is made, the ID of the content record is returned.

GroupName=20[ListID(groups,optional criteria)]

When the administrator drops this on a page and double clicks on it, this option string will produce a drop down selector with all the groups in the Groups content. By default, the group with ID=20 will be selected. When the administrator selects one of the groups, its ID replace 30 in the instance of the Add-on on the page.

ListFields( contentName )

Returns a drop down select list of all the fields in a content definition (meta data for a table). When a selection is made, the name of the field is returned.

FieldName=email[ListFields(people)]

When the administrator drops this on a page and double clicks on it, this option string will produce a drop down selector with all the groups in the Groups content. By default, the group with ID=20 will be selected. When the administrator selects one of the groups, its ID replace 30 in the instance of the Add-on on the page.

Reserved characters

There are several characters the system uses to parse the option list. When used in an option value, they must be replaced with the following:

#0038#
#0061#
#0044#
#0034#
#0039#
#0124#
#0091#
#0093#

This page was last reviewed Monday, January 03, 2011

Support

Home

Search

FAQ



space
Login
space