Flex formatters
Flex formatters can be used to create output that requires special formatting which is not available from a default formatter. Flex formatters use the powerful StringTemplate engine and allow to create custom HTML with access to the content element values and support for if...else...endif conditionals. With a little exra effort, even direct edit in the page is supported in flex formatters.
This page shows examples of flex formatters. On the left a sample output is shown, while on the right details about the same content element is displayed. Check out the source code of the flex formatters used on this page in order to see how these can be extended.
Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor.
Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor.
Design
/mercury-demo/.content/section-m/cs_00114.xml
Type: m-section
Content structure
- Image[1]
- Image[1]/Image[1]
- Link[1]
- Link[1]/Text[1]
- Link[1]/URI[1]
- Text[1]
- Title[1]
m-section
This content has no Headline
Title: Design
Setting selected: Option one
Current user: Guest
Request time: Monday, 18.11.2024 01:16 PM
Mindful Members Mingling
Mindful Members Mingling
/mercury-demo/.content/event-m/ev_00007.xml
Type: m-event
Content structure
- AddressChoice[1]
- AddressChoice[1]/Address[1]
- AddressChoice[1]/Address[1]/Country[1]
- AddressChoice[1]/Address[1]/Locality[1]
- AddressChoice[1]/Address[1]/Name[1]
- AddressChoice[1]/Address[1]/PostalCode[1]
- AddressChoice[1]/Address[1]/StreetAddress[1]
- Category[1]
- Dates[1]
- Intro[1]
- Paragraph[1]
- Paragraph[1]/Caption[1]
- Paragraph[1]/Image[1]
- Paragraph[1]/Image[1]/Image[1]
- Paragraph[1]/Image[1]/Title[1]
- Paragraph[1]/Link[1]
- Paragraph[1]/Link[1]/Text[1]
- Paragraph[1]/Link[1]/URI[1]
- Paragraph[1]/Text[1]
- Paragraph[2]
- Paragraph[2]/Caption[1]
- Paragraph[2]/Image[1]
- Paragraph[2]/Image[1]/Copyright[1]
- Paragraph[2]/Image[1]/Image[1]
- Paragraph[2]/Link[1]
- Paragraph[2]/Link[1]/Text[1]
- Paragraph[2]/Link[1]/URI[1]
- Paragraph[2]/Text[1]
- Title[1]
- Type[1]
OpenCms is just fun
Claire Dunphy
OpenCms is just fun
/mercury-demo/.content/article-m/a_00002.xml
Type: m-article
Content structure
- Author[1]
- Category[1]
- Date[1]
- Image[1]
- Image[1]/Image[1]
- Image[1]/Title[1]
- Intro[1]
- Order[1]
- Paragraph[1]
- Paragraph[1]/Image[1]
- Paragraph[1]/Image[1]/Image[1]
- Paragraph[1]/Image[1]/Title[1]
- Paragraph[1]/Link[1]
- Paragraph[1]/Link[1]/Text[1]
- Paragraph[1]/Link[1]/URI[1]
- Paragraph[1]/Text[1]
- Paragraph[2]
- Paragraph[2]/Text[1]
- Paragraph[3]
- Paragraph[3]/Caption[1]
- Paragraph[3]/Image[1]
- Paragraph[3]/Image[1]/Copyright[1]
- Paragraph[3]/Image[1]/Image[1]
- Paragraph[3]/Image[1]/Title[1]
- Paragraph[3]/Text[1]
- Paragraph[4]
- Paragraph[4]/Caption[1]
- Paragraph[4]/Text[1]
- Paragraph[5]
- Paragraph[5]/Caption[1]
- Paragraph[5]/Image[1]
- Paragraph[5]/Image[1]/Copyright[1]
- Paragraph[5]/Image[1]/Image[1]
- Paragraph[5]/Image[1]/Title[1]
- Paragraph[5]/Text[1]
- Preface[1]
- TeaserData[1]
- TeaserData[1]/TeaserPreface[1]
- Title[1]
Standard link sequence
Standard link sequence
/mercury-demo/.content/linksequence-m/ls_00001.xml
Type: m-linksequence
Content structure
- LinkEntry[1]
- LinkEntry[1]/NewWindow[1]
- LinkEntry[1]/Text[1]
- LinkEntry[1]/URI[1]
- LinkEntry[2]
- LinkEntry[2]/NewWindow[1]
- LinkEntry[2]/Text[1]
- LinkEntry[2]/URI[1]
- LinkEntry[3]
- LinkEntry[3]/NewWindow[1]
- LinkEntry[3]/Text[1]
- LinkEntry[3]/URI[1]
- Title[1]