Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Create the module structure we will need:

Code Block
languagebash
cd my-light-modules
mkdir -p block-examples/blocks
mkdir -p block-examples/templates/blocks

...

Add the template definition:

Code Block
languagebashyaml
titleblock-examples/templates/blocks/quote.yaml
templateScript: /block-examples/templates/blocks/quote.ftl
renderType: freemarker

Add the template script:

Code Block
languageyaml
titleblock-examples/templates/blocks/quote.ftl
[#if content.quotation?has_content]
<blockquote>
<p>${cmsfn.decode(content).quotation}</p>
    [#if content.citedPerson?has_content]<cite>${content.citedPerson}</cite>[/#if]
</blockquote>
[/#if]



YZ