Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: DOCU-1910

...

Localtab Group
Localtab
activetrue
titleYAML file
Code Block
languagejs
titleexample/templates/pages/home.yaml
areas:
  header:
    # header area configuration
  content:
    # content area configuration
  footer:
    # footer area configuration
Localtab
titleJCR node
Advanced Tables - Table Plus
heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue
Mgnl f
my-module
 

Mgnl f
templates

 


Mgnl f
pages

 

Mgnl n
home

 

Mgnl n
areas

 


Mgnl n
header

 


Mgnl n
content

 

Mgnl n
footer

 


Area properties

Simple area definition:

Localtab Group
Localtab
activetrue
titleYAML file
Code Block
languagejs
areas:
  content:
    renderType: freemarker
    type: list
    availableComponents: 
      text:
        id: my-module:components/text
    optional: false
Localtab
titleJCR node
Advanced Tables - Table Plus
heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue

Mgnl n
areas

 


Mgnl n
content

 


Mgnl n
availableComponents

 


Mgnl n
text

 


Mgnl p
id

my-module:components/text

Mgnl p
optional

false

Mgnl p
renderType

freemarker

Mgnl p
type

list

...

Localtab Group
Localtab
activetrue
titleYAML file
Code Block
languagejs
areas:
  intro:
    type: single
    availableComponents:
      styledIntroText:
        id: my-module:components/styledIntroText
  main:
    availableComponents:
      textImage: 
        id: my-module:components/textImage
      blockQuote:
        id: my-module:components/blockQuote       
  close:
    type: noComponent
    templateScript: /my-module/templates/misc/close.ftl 
Localtab
titleJCR node
Advanced Tables - Table Plus
heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue

Mgnl n
areas

 

Mgnl n
intro

 


Mgnl n
availableComponents

 


Mgnl n
styledIntroText

 


Mgnl n
id

my-module:components/styledIntroText

Mgnl p
type

single

Mgnl n
main

 


Mgnl n
availableComponents

 


Mgnl n
textImage

                       

Mgnl n
id

my-module:components/textImage

Mgnl n
blockQuote

 


Mgnl n
id

my-module:components/blockQuote

Mgnl n
close

 


Mgnl p
templateScript

/my-module/templates/misc/close.ftl

Mgnl p
type

noComponent

...

Areas can contain nested areas, which can in turn contain nested areas. (warning) If you use a nested area, you need to assign a separate template script to the parent area in which the child area is rendered.

Localtab Group
Localtab
activetrue
titleYAML file
Code Block
languageyml
linenumbersjstrue
areas:
  mainnavigation:
    typetemplateScript: single/my-web/templates/areas/navigation.ftl
    areas:
      contentnavigationTeaser:
        type: listsingle
        availableComponents:
          textImagearticleTeaser:
            id: my-templatesweb:components/textImage navigationTeaser
Localtab
titleJCR node
Advanced Tables - Table Plus
heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue

Mgnl n
areas


Mgnl n

 

navigation


mgnl-

n

Paragraph

main
 

templateScript

/my-web/templates/areas/navigation.ftl

Mgnl n
areas

 


Mgnl n
content

 

navigationTeaser


Mgnl p
type

 list single

Mgnl n
availableComponents

 


Mgnl n
textImage

 

articleTeaser


Mgnl p
id

my-templatesweb:components/textImage navigationTeaser

Creating area nodes

Area nodes are created in the JCR for each configured area by default. This is controlled by the createAreaNode property that is set to true by default.

...

Localtab Group
Localtab
activetrue
titleYAML file
Code Block
languagejs
areas:
  stockExchangeTicker:
    createAreaNode: false
    templateScript: /my-module/templates/misc/stockExchangeTicker.ftl
    type: noComponent
Localtab
titleJCR node
Advanced Tables - Table Plus
heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue

Mgnl n
areas

 


Mgnl n
stockExchangeTicker

 


Mgnl p
createAreaNode

false

Mgnl p
templateScript

/my-module/templates/misc/stockExchangeTicker.ftl

Mgnl p
type

 noComponent