Start page / Template development / Template syntax / System objects / #list

#listAvailable from FirstSpirit Version 4.0

The system object: #list is available in the format templates with the abbreviations ul and li . Unlike the system object: #listitem (which returns information on an individual list point) the system object: #list returns information for the whole list.

Lists can be entered and maintained in the following input components:

The general syntax of the system object is as follows:

$CMS_VALUE(#list.METHOD)$

The following table lists the methods of the system object: #list :

Invocation

Meaning

Return data type

#list.attr("IDENTIFIER")

Returns the value of an input field defined with the parameter: listConfig . The listConfig parameter can be specified for the input components DOM and DOMTABLE .

String

#list.count

Returns the number of list elements without consideration of the starting value for the list counting (#list.start).

Example: If start has been specified with 300 and the list contains 10 elements the output is 10.

Integer

#list.count2

Returns the number of list elements with consideration of the starting value for the list counting (#list.start). The value of #list.count2 results from the formula: #list.start + #list.count - 1.

Example:
If start has been specified with 300 and the list contains 10 elements the output is 309.

Number

#list.start

Returns the value defined as the starting value for the list counting. The value is specified in the parameter: listDefaultConfig (see input component DOM and DOMTABLE)

Integer

#list.style

Returns the selected list type. Possible values are:

  • 0: Paragraph indent marking
  • 1: Bullet
  • 2: Numbered
  • 3: Alphabetical as lower case letters
  • 4: Alphabetical as upper case letters
  • 5: Roman numerals as lower case letters
  • 6: Roman numerals as upper case letters
  • 7: Empty / indent only
  • 8: User-defined

Integer

   

Examples of #list

Several examples of use of the instruction within templates are shown in the following. The examples are intended to clearly show the specific effect of the instruction and provide help for the template developer when creating their own templates.

Important The examples displayed here must be adjusted for use within a project! For example, variable names must be changed to the specific variable names of the project in which the instruction is to be used.
The list contains $CMS_VALUE(#list.count)$ elements.
The counting begins with the value $CMS_VALUE(#list.start)$.
The value of the last list element is $CMS_VALUE(#list.count2)$.

The example outputs how many elements the list contains, from which value the counting begins and what the number of the last element is.

Exemplary output:

The list contains 4 elements.
The counting begins with the value 257.
The value of the last list element is 260.

© 2005 - 2024 Crownpeak Technology GmbH | All rights reserved. | FirstSpirit 2024.4 | Data privacy