SectionListEntry data type
Value range of the SectionListEntry data type
The SECTIONLIST input component can be used to create a list of existing sections. The input component is used, e.g. to create a table of contents with jump labels to the sections.
As the input component returns a List of SectionListEntry objects, the individual section entries are output with a $CMS_FOR(...)$ instruction
<ul>
$CMS_FOR(section, st_sectionlist)$
<li><a href="#$CMS_VALUE(section.anchorName)$">$CMS_VALUE(section.text)$ -> Sectionname: $CMS_VALUE(section.sectionName)$</a></li>
$CMS_END_FOR$
</ul>
For further information on the SectionListEntry data type, see API documentation:
Definition using the standard input components
Different input components can be defined in the form area of a page or section template. These form elements can then be used to insert the actual editorial contents into the page. The Standard input components supported by FirstSpirit return different data types.
The following standard input components returns a List of objects of the data type SectionListEntry :
Then, with the help of a $CMS_VALUE(...)$ instruction, methods can then be applied to these objects:
$CMS_VALUE(IDENTIFIER.METHOD)$
Under IDENTIFIER, the loop variable of the $CMS_FOR(...)$ instruction used to iterate over the input component must be specified.
Methods on SectionListEntry objects
The table below lists all methods which can be invoked on objects of data type SectionListEntry.
The object is generated by the following form objects: |
---|
CMS_INPUT_SECTIONLIST |
equals(Object)
Method name | Return type | Available since |
---|---|---|
equals(Object) | boolean |
getAnchorName
The .getAnchorName() (in Bean syntax: .anchorName) method returns the name of the anchor generated by the section in HTML syntax.
The returned object is a character string (see java.lang.String).
Method name | Return type | Available since |
---|---|---|
getAnchorName | String |
getClass
The .getClass() (in Bean syntax: .class) method returns the class of the invoking object (cf. java.lang.Class).
Invocation:
$CMS_VALUE(myString.class)$
$CMS_VALUE(myString.getClass())$
Output:
java.lang.String
Method name | Return type | Available since |
---|---|---|
getClass | Class |
getSectionName
The .getSectionName() (in Bean syntax: .sectionName) method returns the reference name of the section.
The returned object is a character string (see java.lang.String).
Method name | Return type | Available since |
---|---|---|
getSectionName | String |
getText
The .getText() (in Bean syntax: .text) method returns the label assigned to the section.
The returned object is a character string (see java.lang.String).
Method name | Return type | Available since |
---|---|---|
getText | String |
isCase(Object)
Method name | Return type | Available since |
---|---|---|
isCase(Object) | boolean |
isNull
The .isNull() (in Bean syntax: .isNull) method checks whether an expression or object is null , e.g. storeElement.isNull(). In the case of objects with complex values or objects, the object decides when it is null. The data type DomElement for example always contains an empty document, thus it is never null. For this reason, checking an empty DOM editor input component by using the method .isNull() returns the value false, whereas checking the component with .isEmpty() would return the value true.
The method .isNull() returns a Boolean value as the check result. true is the check result if the expression or object is null and false if not.
Method name | Return type | Available since |
---|---|---|
isNull | boolean |
Method name | Return type | Available since |
---|---|---|
void |
set(String, Object)
Method name | Return type | Available since |
---|---|---|
set(String, Object) | Object |
setSectionName(String)
The method .setSectionName(String) (in bean syntax: .sectionName(String)) changes the section's name ()in the sectionlist) to the passed value.
If the section itself is not renamed at the same time, the entry is no longer displayed.
Method name | Return type | Available since |
---|---|---|
setSectionName(String) | void |
setText(String)
The method setText(String) (in bean syntax: .text(string)) changes the label assigned to the section to the passed value.
Method name | Return type | Available since |
---|---|---|
setText(String) | void |
toJSON
Convert to a JSON-compatible string representation including necessary quotes and escaping for immediate use. Handles Maps, Collections, Arrays, Numbers, Strings, Boolean, Date, and JsonElement. A date instance will be converted to an ISO-8601 formatted date string. Any object other than above will be converted using its 'toString()' value.Method name | Return type | Available since |
---|---|---|
toJSON | String | 5.2.11 |
toString
Method name | Return type | Available since |
---|---|---|
toString | String |
toXml
The .toXML() (in Bean syntax: .xml) method returns a XML representation of the section.
The returned object is a character string (see java.lang.String).
Method name | Return type | Available since |
---|---|---|
toXml | String |
type
Method name | Return type | Available since |
---|---|---|
type | String |