PAGE type
Contents |
for example |
to the methods: FormDataList<IdProvidingFormData> |
FS_LIST, PAGE type
The FS_LIST type PAGE is used to create a list of sections of the current page. Sections can be selected from this by means of checkboxes. In additional, labeling can be assigned for each section, which can be taken into account in the output.
In the examples below, exemplary configurations for FS_LIST, PAGE type, are presented first (1)).
Then it is shown how previously used configurations of CMS_INPUT_SECTIONLIST are replaced with FS_LIST (2)).
On changing over from CMS_INPUT_SECTIONLIST to FS_LIST, please note that if data has been saved with FS_LIST, in the event of a possible subsequent return, due to a different data format, it can no longer be read and interpreted by CMS_INPUT_SECTIONLIST. |
FS_LIST input components of type PAGE are always language-dependent. |
Access-API example use case
The exemplary implementation FsListEditorValueExample shows some simple examples of use for the reading, writing and creating access to the data object (FsListEditorValue) and its inner data container (FormDataList) of the input component by means of the FirstSpirit Access-API.
- Example of use: FsListEditorValueExample
- Data object: FsListEditorValue
- Container type: FormDataList
Mandatory
Optional parameters
Optional parameters
Optional parameters
Optional parameters
Optional parameters
Optional parameters
Optional parameters
Optional parameters
Mandatory
Mandatory
Optional parameters
Optional parameters
Optional parameters
Optional parameters
Mandatory
Optional parameters
Optional parameters
Parameter
The following table gives the parameters of the DATASET input component.
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.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
name* | Yes | 3.1 | Designator | None |
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.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
allowEmpty | No | 3.0 | YesNo | YES |
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 .
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
hFill | No | 2.0 | YesNo | NO |
height
The height parameter is used to determine the display height of the input component in pixel.
The parameter expects an integer value. If the parameter is not defined the height of the input component is set by default to 500 pixel.
According to the layout, the function (for example the expand behaviour) and (when indicated) the parameter rows, the height should not be too low.
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.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
height | No | 4.2.434 | PositiveInteger | 500 |
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.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
hidden | No | 4.0.44 | YesNo | NO |
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.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
noBreak | No | 2.0 | YesNo | NO |
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 fall-back 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.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
preset | No | 4.0 | Preset | DEFAULT |
rows
If an overview is defined for the input component of the DATASOURCE types DATABASE, INLINE or SERVICE (<ADD component="overview" ... >) you can use the parameter rows to specify the height of this overview in rows. For this purpose, the number of rows must be specified. For the DATASOURCE type PAGE the figure which is specified by rows refers to the height the input component in rows. A horizontal splitter is available to modify the height of the overview and the detailed views.
The parameter expects an integer value.
The default is 10.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
rows | No | 4.2 | PositiveInteger | 10 |
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.
The parameter does not have any effect if the hFill parameter is used. |
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
width | No | 4.2 | PositiveInteger | None |
DATASOURCE
The DATASOURCE tag defines the data type the input component should draw from.
If the tag is given more than once for an input component, the last/lowest definition is always adopted and all other definitions are removed.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
type* | Yes | 4.2.403 | DataSourceType | None |
type
The mandatory parameter type defines the data type which the input component should draw from or, rather, the type of data origin.
The following types are supported:
- DATABASE: With this parameter it is possible to create a list of data sets. The table template on which the content source is based, from which data sets are to be selected or created in the new data sets, must be given with the TABLE tag.
- INLINE: With this parameter it is possible to create a list of sections and links. The TEMPLATES tag and its source parameter must be used to define whether a section or link list is to be defined.
- PAGE: With this parameter it is possible to display a list of the sections of the current page.
- SERVICE: With this parameter it is possible to use a service module to link to external data suppliers which provide data for the input component. Further information on the configuration is provided in the FirstSpirit Developer Manual for Components.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
type* | Yes | 4.2.403 | DataSourceType | None |
LABELS
By default, the following are used for labeling, e.g. the labeling of the overview, tab, bars and tool tips:
- the names of all input components, which are contained in the selected section, link or table template (identifiers), in square brackets and
- the values (if available), which are saved in the input components, if they are of the data type string (e.g. CMS_INPUT_TEXT, CMS_INPUT_TEXTAREA, CMS_INPUT_DOM)
The LABELS tag can be used to influence the labeling.
DATASOURCE type PAGE: LABELS / LABEL are not supported for this data source type. |
In this case, a LABEL tag must be given for each language.
IMPORTANT: At least the fall-back label ("*") must be defined:
<LABELS>
<LABEL lang="*">...</LABEL>
</LABELS>
LABEL
The LABEL tag can be used to define flexible, language-dependent labeling for each language.
To define the labeling for a language, the abbreviation of the project language must be given in the lang parameter:
...
<LABEL lang="DE">...</LABEL>
<LABEL lang="EN">...</LABEL>
...
Fall-back values are given with the special language code * ("for all languages"):
...
<LABEL lang="*">...</LABEL>
...
The lang parameter is a mandatory parameter.
The labeling text is given within an opening and closing <LABEL> tag (see placeholder TEXT).
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
lang* | Yes | 4.2 | String | None |
lang
The lang parameter is used to give the language abbreviation which is entered in the server properties see , 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.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
lang* | Yes | 4.2 | String | None |
TEXT
Here it is possible to define alternative labeling.
The system object #item is available to access the values stored in the input component.
In the case of the DATASOURCE type DATABASE, the variable of the column (identifier of the input component) is appended, separated by a dot, e.g.
#item.cs_lastname
If the table referenced via FS_LIST is connected to another table via a foreign (external) key, the values of a column in the connected table can be used for the labeling in FS_LIST by using #item with the foreign key identifier and the required column name, e.g.
#item.product_Properties_Type.Name
where product_Properties_Type is the foreign key name, Name is the name of a column in the table defined via product_Properties_Type.
In the case of the DATASOURCE type INLINE, the variable of the respective section or link template (identifier of the input component) is appended, separated by a dot, e.g.
#item.st_headline
In both cases, combinations of the values of several input components are also possible, e.g.
<LABELS>
<LABEL lang="*">#item.cs_firstname + " " + #item.cs_lastname</LABEL>
</LABELS>
In order, for example, to define an alternative value for display, in case the input component concerned is not filled, the if(...) function can be used, e.g.
<LABELS>
<LABEL lang="*">if(#item.st_headline.isEmpty, "No headline", #item.st_headline)</LABEL>
</LABELS>
In this example, the text "No headline" is displayed if the input component is not filled.
In the case of the DATASOURCE type INLINE, the identifier of input components of different section and link templates can also be given. This option suggests itself if the selection is not limited to one template and the identifiers of the input components vary from template to template. If an identifier given by #item is not available in the template selected by the editor, nothing is output.
Example:
FS_LIST enables the selection to be made from two section templates of which one contains a text field with the identifier "st_text" and one contains a text field with the identifier "st_headline".
If the editor now chooses the section template containing the identifier "st_text", the syntax
<LABELS>
<LABEL lang="*">#item.st_text + #item.st_headline</LABEL>
</LABELS>
uses the stored value of the input component "st_text" for the labeling.
If the editor chooses the section template containing the identifier "st_headline", the stored value of the input component "st_headline" is used.
If a template contains both identifiers, both are used for the labeling. A separator should be provided for this case, e.g.
<LABELS>
<LABEL lang="*">#item.st_text + " " + #item.st_headline</LABEL>
</LABELS>
Care should be taken to ensure that the variables used (identifiers of the input components) are given correctly, and the variables should also actually be present in the templates available to choose from. Otherwise, the default labeling is used (name and all values of all input components of the selected template). For optimum clarity and user-friendliness of the component, the shortest possible labeling should be chosen. |
In the case of the DATASOURCE type INLINE, it is also possible to determine the template of a section or link in the list. The system object #template is available for this purpose.
The reference name of the template used can, e.g., be output for labeling via the following syntax:
<LABELS>
<LABEL lang="*">#template.uid</LABEL>
</LABELS>
Here, too, the if(...) function can be used to implement labeling depending on the template selected.
DATASOURCE type PAGE: LABELS / LABEL are not supported for this data source type.
COLUMNS
By default, the input component shows a list of all the sections of the page, each with a checkbox for selecting individual sections and a text field via which a name can be assigned to each section.
In addition, COLUMNS / COLUMN can also be used to show a column with consecutive numbering.
The COLUMNS tag can be used to change the display.
COLUMN
The COLUMN tag can be used to define properties for one column.
The name of the column to which the properties are to apply, is given within an opening and closing COLUMN tag (see TEXT placeholder of the COLUMNS tag).
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
resizable | No | 4.2 | YesNo | YES |
show | No | 4.2 | YesNo | YES |
sortOrder | No | 4.2 | SortOrder | None |
width | No | 4.2 | PositiveInteger | None |
resizable
The resizable parameter has no effect on this DATASOURCE type.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
resizable | No | 4.2 | YesNo | YES |
show
The show parameter can be used to define whether a column (see COLUMNS / COLUMN / TEXT) is displayed in the input component or not.
If COLUMNS / COLUMN is not given,
<COLUMNS>
<COLUMN show="no">#identifier</COLUMN>
</COLUMNS>
is automatically added on saving. In this configuration, all columns except the column with the consecutive numbering are displayed.
If COLUMN is given for a column, by default it is displayed (show="YES").
If a column is to be hidden, show="NO" must be set. Other parameters within COLUMN then have no effect on the column concerned.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
show | No | 4.2 | YesNo | YES |
sortOrder
The sortOrder parameter has no effect on this DATASOURCE type.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
sortOrder | No | 4.2 | SortOrder | None |
width
The width parameter can be used to specify the display width of the column in pixels.
The parameter expects an integer value.
If the parameter is not given the column width corresponds to the content of the columns.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
width | No | 4.2 | PositiveInteger | None |
TEXT
The column to which the properties are to apply is defined here.
The following identifiers are used for this:
- #identifier: Column with consecutive numbering
- #text: Column with checkbox
This identifier is enclosed by an opening and closing COLUMN tag.
If COLUMNS / COLUMN is not given, the following configuration is automatically added upon saving:
<COLUMNS>
<COLUMN show="no">#identifier</COLUMN>
</COLUMNS>
LANGINFOS
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.
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.
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.
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>
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.
LANGINFO
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.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
lang* | Yes | 3.1 | LanguageAbbreviation | None |
description | No | 3.1 | String | None |
label | No | 3.1 | String | None |
lang
The lang parameter is used to give the language abbreviation which is entered in the server properties see , 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.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
lang* | Yes | 3.1 | LanguageAbbreviation | None |
description
The description parameter can be used to give a description which is used to display a tool tip (mouse-over).
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
description | No | 3.1 | String | None |
label
The label parameter is used to give the surface labelling for input and visualisation components.
Parameter | Mandatory | Since | Type | Default value |
---|---|---|---|---|
label | No | 3.1 | String | None |
Examples
1) Configuration example of FS_LIST, PAGE type
<FS_LIST name="IDENTIFIER">
<DATASOURCE type="page"/>
<LANGINFOS>
<LANGINFO lang="*" label="Sections of this page"/>
</LANGINFOS>
</FS_LIST>
2) Displaying the input component CMS_INPUT_SECTIONLIST
The input component FS_LIST can be used to display the functions of the input component CMS_INPUT_SECTIONLIST.
On changing over from CMS_INPUT_SECTIONLIST to FS_LIST, please note that if data has been saved with FS_LIST, in the event of a possible subsequent return, due to a different data format, it can no longer be read and interpreted by CMS_INPUT_SECTIONLIST. |
Example form CMS_INPUT_SECTIONLIST:
<CMS_INPUT_SECTIONLIST name="IDENTIFIER">
<LANGINFOS>
<LANGINFO lang="*" label="Sections of this page"/>
</LANGINFOS>
</CMS_INPUT_SECTIONLIST>
Display using FS_LIST:
<FS_LIST name="IDENTIFIER">
<DATASOURCE type="page">
<COLUMNS>
<COLUMN show="no">#identifier</COLUMN>
</COLUMNS>
</DATASOURCE>
<LANGINFOS>
<LANGINFO lang="*" label="Sections of this page"/>
</LANGINFOS>
</FS_LIST>
Apart from changing over the form tag from CMS_INPUT_SECTIONLIST to FS_LIST it is only necessary to add
<DATASOURCE type="page"/>
<COLUMNS>
<COLUMN show="no">#identifier</COLUMN>
</COLUMNS>
for hiding the column with the consecutive numbering (#identifier) is automatically added when the template is saved.