Start page
Start page

Start page / Template development / Forms / Input components (deprecated) / CONTENTLIST

CMS_INPUT_CONTENTLISTAvailable up to FirstSpirit Version 5.0

Contents
for example
to the methods: List<Entity>

CMS_INPUT_CONTENTLIST

The CMS_INPUT_CONTENTLIST input component is used to select data records from the Content Store and to output it on a page or in a section of the Page Store. Which data source is available to select depends on the given table template. The template developer can use the "table" attribute to link a table from the Content Store with the input component. The editor clicks the "Add" button to open a window with a view of the linked table. Any number of data records can be selected here, which are then displayed in the input component. Which elements of the data records are displayed depends on the defined output. According to the configuration new entries can be created in the table by using this input component.

Access-API example use case
The exemplary implementation ContentListEditorValueExample shows some simple examples of use for the reading, writing and creating access to the data object (ContentListEditorValue) and its inner data container (SectionList) of the input component by means of the FirstSpirit Access-API.

name
Designator
Mandatory
table
TableTemplateReference
Mandatory
allowEdit
YesNo
Optional parameter
allowEmpty
YesNo
Optional parameter
allowNew
YesNo
Optional parameter
convertEntities
ConvertEntity
Optional parameter
hFill
YesNo
Optional parameter
hidden
YesNo
Optional parameter
indexAttribute
String
Optional parameter
maxEntries
PositiveInteger
Optional parameter
noBreak
YesNo
Optional parameter
preset
Preset
Optional parameter
rows
PositiveInteger
Optional parameter
tableView
String
Optional parameter
tableViewFK
String
Optional parameter
useLanguages
YesNo
Optional parameter
width
PositiveInteger
Optional parameter
lang
LanguageAbbreviation
Mandatory
description
String
Optional parameter
label
String
Optional parameter
mediaEditor
String
Mandatory
allowFolders
YesNo
Optional parameter
key
String
Mandatory
name
String
Mandatory
lang
LanguageAbbreviation
Mandatory
description
String
Optional parameter
label
String
Optional parameter

Parameter

The following table gives the parameters of the CONTENTLIST input component.

ParameterMandatorySinceTypeDefault value
name*Yes3.1DesignatorNone
table*Yes3.0TableTemplateReferenceNone
allowEditNo3.0YesNoNO
allowEmptyNo3.0YesNoYES
allowNewNo3.0YesNoNO
convertEntitiesNo2.0ConvertEntityNONE
hFillNo2.0YesNoNO
hiddenNo4.0.44YesNoNO
indexAttributeNo4.1StringNone
maxEntriesNo3.0PositiveIntegerNone
noBreakNo2.0YesNoNO
presetNo4.0PresetDEFAULT
rowsNo3.0PositiveInteger10
tableViewNo3.1StringNone
tableViewFKNo3.1StringNone
useLanguagesNo2.0YesNoYES
widthNo3.0PositiveInteger480

name

The attribute "name" is the variable name of an input component with which the the result object of the input component can be used in the templates - with the help of $CMS_VALUE()$ - or the content can be output.

ParameterMandatorySinceTypeDefault value
name*Yes3.1DesignatorNone

table

The table parameter is used to give the reference to the table template.

The value given must be the unique identifier of the table template.

The reference is required to specify from which table selections can be made and which input components are to be displayed.

ParameterMandatorySinceTypeDefault value
table*Yes3.0TableTemplateReferenceNone

allowEdit

The allowEdit parameter can be used to allow as well as to prevent the editing of entries in the input component.

If the parameter is not given, the entries can not be edited.

The editing of entries is made possible by specifying YES (...allowEdit="YES"...).

ParameterMandatorySinceTypeDefault value
allowEditNo3.0YesNoNO

allowEmpty

The "allowEmpty" parameter is used to specify whether a value has to be entered for an input value or not.

If allowEmpty="YES" input is not mandatory; however, it is if allowEmpty="NO".

Input components with allowEmpty="NO" are also called mandatory input components.

The default value for allowEmpty is YES.

ParameterMandatorySinceTypeDefault value
allowEmptyNo3.0YesNoYES

allowNew

The allowNew parameter can be used to allow as well as to prevent the creation of new entries.

If the parameter is not given, no new entries can be created.

If YES (...allowNew="YES"...) is specified, new entries can be created.

ParameterMandatorySinceTypeDefault value
allowNewNo3.0YesNoNO

convertEntities

The "convertEntities" attribute is used to convert special characters entered in the input components for output in HTML characters.

There are three forms:

  • convertEntities="NONE" (standard)
  • convertEntities="STANDARD"
  • convertEntities="QUOTE"

With the NONE form, no conversion rules whatsoever are applied.

If STANDARD is given the conversion rules in the "convert" area of the selected conversion rule of the presentation channel are applied.

The form QUOTE explicitly includes STANDARD too. However, the "quote" area of the conversion rule is also applied.

ParameterMandatorySinceTypeDefault value
convertEntitiesNo2.0ConvertEntityNONE

hFill

An input component is always displayed with a pre-defined width.

However, if the input component is to use the full available display width the parameter hFill must be given with the value YES .

ParameterMandatorySinceTypeDefault value
hFillNo2.0YesNoNO

hidden

With the "hidden" parameter an input component can be hidden from the editor.

If hidden="YES" the input component is not visible for the editor, if hidden="NO" it is visible.

The default value for hidden is NO.

ParameterMandatorySinceTypeDefault value
hiddenNo4.0.44YesNoNO

indexAttribute

The attribute indexAttribute can be used to save the ordering of elements which are selected in the CONTENTLIST.

Important This is only necessary if the CONTENTLIST is linked to a foreign key.

The CONTENTLIST must be defined in the table template of a table A, which is related to table B, which is referenced in the table template of table A by means of the parameter table, by a 1:N foreign key relation. I.e. table A is the source table (1 element), table B is the target table (N elements). The CONTENTLIST must be linked to the foreign key.

A column of the type Integer must be existing in the target table in the related database schema, which is used for saving the position of each element which is added to the CONTENTLIST. The name of this column must be used for the parameter indexAttribute in double inverted comma.

The following chart shows schematically the use case of the parameter indexAttribute for a media gallery:

(More information about Media galleries see Chapter Media galleries.)

ParameterMandatorySinceTypeDefault value
indexAttributeNo4.1StringNone

maxEntries

The parameter "maxEntries" defines how many entries can be selected or added at most. The parameter expects an integer value.

ParameterMandatorySinceTypeDefault value
maxEntriesNo3.0PositiveIntegerNone

noBreak

The noBreak parameter can be used to suppress automatic line break after an input component.

The noBreak parameter must be given with value "YES" (noBreak="YES") to suppress the automatic line break.

ParameterMandatorySinceTypeDefault value
noBreakNo2.0YesNoNO

preset

Using the preset attribute the handling of default values in an input component can defined (see also chapter Default values). If preset="default" is set, the retrieval value defined in the form is used. If this value in the form is changed later on, these changes will be affect all usages of this default value in the input components maintained by the editor, as long as a value will be set manually in the input component. This is the default setting. If preset="copy" is set, the value entered by the editor is copied directly into the input component. Subsequent changes to the default value in the form do not have any effect on the usages of this default value in the input components maintained by the editor.

ParameterMandatorySinceTypeDefault value
presetNo4.0PresetDEFAULT

rows

The rows parameter is used to define the display height of the input component in table rows.

The parameter expects an integer value.

If the input component is used within a group (CMS_GROUP), the height will comply with the height of the highest input component of the group.

ParameterMandatorySinceTypeDefault value
rowsNo3.0PositiveInteger10

tableView

The tableView and tableViewFK parameters can be used to jump from linked content store data to the given content view.

The value to be given for the tableView parameter is the name of the content view in the content store which is to be used as the jump address.

To determine the linked content store data, for the tableViewFK attribute, the name of the relationship between the selection table (see table parameter) and the jump table from the content schemata (template store) must be given.

The attributes tableView and tableViewFK must always be given simultaneously!

The above diagram shows a configuration example.

In the example the selection content view is called Furnishings and represents the Furnishings table from the content schemata (indicated by the arrow with the labelling data view).

Between the Furnishings table and User Profile there is an N:M relationship called Furnishing_to_UserProfile_list (grey background).

The content view for the User Profile table is called User Profile (grey background) and should be used as the jump address.

For the tableView attribute the User Profile must therefore be selected and for tableViewFK Furnishing_to_UserProfile_list.

If the user selects content store data from the selection content view (numbered with 1 in the diagram), after selecting the item Jump to content , they can right-click to jump to the linked content in the User Profile content view.

ParameterMandatorySinceTypeDefault value
tableViewNo3.1StringNone

tableViewFK

Important The tableViewFK parameter can only be used in conjunction with the tableView parameter.

The description of the parameter is given under the tableView parameter.

ParameterMandatorySinceTypeDefault value
tableViewFKNo3.1StringNone

useLanguages

The useLanguages parameter can be used to specify whether or not an input component is to store different or deviating values for different languages (multi-lingual maintenance).

If the parameter is not given, deviating values are stored for the different languages as a default.

If NO (...useLanguages="NO") is specified, one value is stored for all languages.

ParameterMandatorySinceTypeDefault value
useLanguagesNo2.0YesNoYES

width

The width parameter can be used to specify the display width of the input component in pixels.

The parameter expects an integer value.

If the parameter is not given the default width is 480 pixels.

Important The parameter does not have any effect if the hFill parameter is used.

ParameterMandatorySinceTypeDefault value
widthNo3.0PositiveInteger480

LANGINFOSAvailable from FirstSpirit Version 4.0

Using the tag LANGINFOS language-dependent information can be defined for each input component, e.g. which title is to be used for the input component in the different project languages (parameter label), which tooltip is to be displayed (parameter description) etc. For reasons of clarity, definitions which are identical in multiple languages will be merged. For example,

<LANGINFOS> 
<LANGINFO lang="*" label="Datum"/>
<LANGINFO lang="DE" label="Datum"/>
<LANGINFO lang="EN" label="Datum"/>
</LANGINFOS>

will be merged to

 <LANGINFOS> 
<LANGINFO lang="*" label="Datum"/>
</LANGINFOS>

after saving.

Available from FirstSpirit Version 4.2R2 Up to and including FirstSpirit version 4.2R2 language definitions will be deleted only in the case if the values are identical in all languages (as in example above). Furthermore, only the parameters lang, description and label are taken into account when merging.

Available from FirstSpirit Version 4.2R4 Since FirstSpirit version 4.2R4 all parameters are taken into account (e.g. format and length). Furthermore, language definitions are also merged within LANGINFOS tags, if they are identical in at least two languages. For example,

<LANGINFOS> 
<LANGINFO lang="*" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="DE" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="EN" label="Date" format="MM/dd/yy"/>
</LANGINFOS>

will become

 <LANGINFOS> 
<LANGINFO lang="*" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="EN" label="Date" format="MM/dd/yy"/>
</LANGINFOS>

after saving.

The definition for the fallback value (*) will not be deleted in any case. If there are two or more language definitions with identical values the first one will be maintained, the other will be deleted.

Available from FirstSpirit Version 4.2R2 IMPORTANT: Up to and including FirstSpirit version 4.2R2 at least one definition for the fallback labelling ("*") must be given:

<LANGINFOS>
<LANGINFO lang="*" label="TEXT"/>
</LANGINFOS>

Available from FirstSpirit Version 4.2R4 From FirstSpirit version 4.2R4 the fallback definition can be omitted. In this case, the language which is defined first will be used automatically as fallback value. For example,

<LANGINFOS>
<LANGINFO lang="EN" label="Date"/>
<LANGINFO lang="DE" label="Datum"/>
</LANGINFOS>

will become

 <LANGINFOS> 
<LANGINFO lang="*" label="Date"/>
<LANGINFO lang="DE" label="Datum"/>
</LANGINFOS>

after saving.

LANGINFOAvailable from FirstSpirit Version 3.1

The LANGINFO tag is used to give values or attributes for a language as well for use as fallback values.

In order to state values or attributes for a language it is necessary to give the abbreviation of the project language in the lang parameter:

...
<LANGINFO lang="DE".../>
...

Fallback values are given with the special language abbreviation * ("for all languages"):

...
<LANGINFO lang="*".../>
...

The lang parameter is a mandatory parameter.

ParameterMandatorySinceTypeDefault value
lang*Yes3.1LanguageAbbreviationNone
descriptionNo3.1StringNone
labelNo3.1StringNone

lang

The lang parameter is used to give the language abbreviation which is entered in the server properties see View document FirstSpirit Manual for Administrators, Chapter "Language templates") to specify for which project languages the definitions are to apply, e.g. DE for German, EN for English, FR for French etc. The following characters can be used as often as required: -, _, 0-9 and A-Z. Lower case letters are transformed automatically into upper case letters after having saved the template. In addition * can be used for fallback values.

ParameterMandatorySinceTypeDefault value
lang*Yes3.1LanguageAbbreviationNone

description

The description parameter can be used to give a description which is used to display a tool tip (mouse-over).

ParameterMandatorySinceTypeDefault value
descriptionNo3.1StringNone

label

The label parameter is used to give the surface labelling for input and visualisation components.

ParameterMandatorySinceTypeDefault value
labelNo3.1StringNone

MEDIAMODEAvailable from FirstSpirit Version 4.1

Using the tag MEDIAMODE media from Media Store can be selected in this input component.

Important For each selected medium a new dataset will be created in which the medium is referenced.

ParameterMandatorySinceTypeDefault value
mediaEditor*Yes4.1StringNone
allowFoldersNo4.1YesNoNO

mediaEditor

The variable name of the picture selection component from the table which is referenced by the parameter table or the tag <TABLE> must be specified for the attribute mediaEditor. This table will be used for saving the reference to the selected picture.

Use case Media gallery: For Media galleries the picture selection component, used in the table template for storing media (so-called "media table"), is specified here. This way, media in the input component are selected from the Media store. For each added medium a new dataset is created in the media table with a reference to the medium from the Media store.

ParameterMandatorySinceTypeDefault value
mediaEditor*Yes4.1StringNone

allowFolders

Using the parameter allowFolders the selection of folders via the media search dialog from the Media store can be allowed or prevented. The pictures in the selected folders are then added to the list.

If allowFolders="YES" is given, folders can be selected, if allowFolders="NO" is given, no folders can be selected.

ParameterMandatorySinceTypeDefault value
allowFoldersNo4.1YesNoNO

QUERYAvailable from FirstSpirit Version 3.0

Using the tag QUERY queries can be defined. These queries can be used for limiting the range of data sets, from which the editor can select by means of this einput component.

For this, all tags and parameters can be used which are available for the query part of the funktion contentSelect.

TABLEVIEWSAvailable from FirstSpirit Version 4.0

Define relations to views.

VIEWAvailable from FirstSpirit Version 3.1

View table view definition parameterized with a name and foreign key attribute name.

ParameterMandatorySinceTypeDefault value
key*Yes4.0StringNone
name*Yes4.0StringNone

key

The foreign key attribute name.

ParameterMandatorySinceTypeDefault value
key*Yes4.0StringNone

name

The view's name.

ParameterMandatorySinceTypeDefault value
name*Yes4.0StringNone

LANGINFOSAvailable from FirstSpirit Version 3.1

Using the tag LANGINFOS language-dependent information can be defined for each input component, e.g. which title is to be used for the input component in the different project languages (parameter label), which tooltip is to be displayed (parameter description) etc. For reasons of clarity, definitions which are identical in multiple languages will be merged. For example,

<LANGINFOS> 
<LANGINFO lang="*" label="Datum"/>
<LANGINFO lang="DE" label="Datum"/>
<LANGINFO lang="EN" label="Datum"/>
</LANGINFOS>

will be merged to

 <LANGINFOS> 
<LANGINFO lang="*" label="Datum"/>
</LANGINFOS>

after saving.

Available from FirstSpirit Version 4.2R2 Up to and including FirstSpirit version 4.2R2 language definitions will be deleted only in the case if the values are identical in all languages (as in example above). Furthermore, only the parameters lang, description and label are taken into account when merging.

Available from FirstSpirit Version 4.2R4 Since FirstSpirit version 4.2R4 all parameters are taken into account (e.g. format and length). Furthermore, language definitions are also merged within LANGINFOS tags, if they are identical in at least two languages. For example,

<LANGINFOS> 
<LANGINFO lang="*" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="DE" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="EN" label="Date" format="MM/dd/yy"/>
</LANGINFOS>

will become

 <LANGINFOS> 
<LANGINFO lang="*" label="Date" format="dd.MM.yy"/>
<LANGINFO lang="EN" label="Date" format="MM/dd/yy"/>
</LANGINFOS>

after saving.

The definition for the fallback value (*) will not be deleted in any case. If there are two or more language definitions with identical values the first one will be maintained, the other will be deleted.

Available from FirstSpirit Version 4.2R2 IMPORTANT: Up to and including FirstSpirit version 4.2R2 at least one definition for the fallback labelling ("*") must be given:

<LANGINFOS>
<LANGINFO lang="*" label="TEXT"/>
</LANGINFOS>

Available from FirstSpirit Version 4.2R4 From FirstSpirit version 4.2R4 the fallback definition can be omitted. In this case, the language which is defined first will be used automatically as fallback value. For example,

<LANGINFOS>
<LANGINFO lang="EN" label="Date"/>
<LANGINFO lang="DE" label="Datum"/>
</LANGINFOS>

will become

 <LANGINFOS> 
<LANGINFO lang="*" label="Date"/>
<LANGINFO lang="DE" label="Datum"/>
</LANGINFOS>

after saving.

LANGINFOAvailable from FirstSpirit Version 3.1

The LANGINFO tag is used to give values or attributes for a language as well for use as fallback values.

In order to state values or attributes for a language it is necessary to give the abbreviation of the project language in the lang parameter:

...
<LANGINFO lang="DE".../>
...

Fallback values are given with the special language abbreviation * ("for all languages"):

...
<LANGINFO lang="*".../>
...

The lang parameter is a mandatory parameter.

ParameterMandatorySinceTypeDefault value
lang*Yes3.1LanguageAbbreviationNone
descriptionNo3.1StringNone
labelNo3.1StringNone

lang

The lang parameter is used to give the language abbreviation which is entered in the server properties see View document FirstSpirit Manual for Administrators, Chapter "Language templates") to specify for which project languages the definitions are to apply, e.g. DE for German, EN for English, FR for French etc. The following characters can be used as often as required: -, _, 0-9 and A-Z. Lower case letters are transformed automatically into upper case letters after having saved the template. In addition * can be used for fallback values.

ParameterMandatorySinceTypeDefault value
lang*Yes3.1LanguageAbbreviationNone

description

The description parameter can be used to give a description which is used to display a tool tip (mouse-over).

ParameterMandatorySinceTypeDefault value
descriptionNo3.1StringNone

label

The label parameter is used to give the surface labelling for input and visualisation components.

ParameterMandatorySinceTypeDefault value
labelNo3.1StringNone
Key

TableTemplateReference

The unique name of a table template, may only contain the characters "A-Z", "a-z", "0-9" and "_", e.g. "fr_st_varName"

LanguageAbbreviation

Language abbreviation, e.g. DE, EN, FR or * for return values

PositiveInteger

Positive integer

YesNo

Switch to apply an attribute or not

NOAvailable from FirstSpirit Version 2.0

Do not apply attribute

YESAvailable from FirstSpirit Version 2.0

Apply attribute

String

A random character string

Preset

Define the general preset modes.

DefaultAvailable from FirstSpirit Version 4.0

Retrieve default from definition, if no value is set.

CopyAvailable from FirstSpirit Version 4.0

Copy default from definition and save automatically.

ConvertEntity

Switch with which to define the conversion rule

NONEAvailable from FirstSpirit Version 2.0

Do not use any conversion rules

STANDARDAvailable from FirstSpirit Version 2.0

Use the conversion rules of the "convert" area

QUOTEAvailable from FirstSpirit Version 2.1

Use the conversion rules of the "convert" and "quote" area

Designator

Unique identifier of variable length; must start with a letter or underscore and may only contain the characters "A-Z", "a-z", "0-9" and "_", e.g. "fr_st_varName"

Example

An example of the input component "CMS_INPUT_CONTENTLIST":

<CMS_INPUT_CONTENTLIST table="TABLE TEMPLATE" name="IDENTIFIER" useLanguages="YES">
<LANGINFOS>
<LANGINFO lang="*" label="TEXT" description="TEXT"/>
<LANGINFO lang="DE" label="TEXT" description="TEXT"/>
<LANGINFO lang="EN" label="TEXT" description="TEXT"/>
</LANGINFOS>
</CMS_INPUT_CONTENTLIST>

An example how to use the input component "CMS_INPUT_CONTENTLIST" for Media galleries:

 <CMS_INPUT_CONTENTLIST
name="IDENTIFIER"
indexAttribute="IDENTIFIER"
table="TABLE TEMPLATE"
useLanguages="YES">
<LANGINFOS>
<LANGINFO lang="*" label="TEXT"/>
<LANGINFO lang="DE" label="TEXT"/>
<LANGINFO lang="EN" label="TEXT"/>
</LANGINFOS>
<MEDIAMODE allowFolders="YES" mediaEditor="IDENTIFIER"/>
</CMS_INPUT_CONTENTLIST>

For further information see Chapter Media galleries.

© 2005 - 2014 e-Spirit AG | All rights reserved. | Last change: 2013-05-24