Versions Compared

Key

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

...

Advanced Tables - Table Plus
heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue

Mgnl n
travel

 

Mgnl n
templates

 


Mgnl n
availability

 


Mgnl n
templates

 


Mgnl n
home

 

Mgnl p
id

travel-demo:pages/home

Mgnl n
standard

 


Mgnl p
id

travel-demo:pages/standard
 

...

Advanced Tables - Table Plus
heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue

Mgnl n
travel

 

Mgnl n
templates

 


Mgnl n
availability

 


Mgnl n
templates

 


Mgnl p
enableAll

true

Option 3: Make templates available by RenderType

...

Advanced Tables - Table Plus
heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue

Mgnl n
travel

 


Mgnl n
templates

 

Mgnl n
availability

 


Mgnl n
templates

 

Mgnl n
enableAllWithRenderType

 

Mgnl p
freemarker

freemarker

Mgnl p
jsp

jsp
 

...

Advanced Tables - Table Plus
heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
  
Node nameValue

Mgnl n
travel

 

Mgnl n
templates

 


Mgnl n
availability


Mgnl n
templates

 


Mgnl n
home

 

Mgnl n
roles


Mgnl p
superuser

superuser

Mgnl p
id

travel-demo:pages/home

Mgnl n
standard

 

Mgnl n
roles

 

Mgnl p
superuser

superuser

Mgnl p
editor

editor

Mgnl p
id

travel-demo:pages/standard

...

Localtab Group
Localtab
activetrue
titleYAML file
Code Block
languagejs
titleexample/templates/pages/home.yaml
renderType: freemarker
templateScript: /my-module/templates/pages/home.ftl
dialog: my-module:pages/homePageProperties
# areas:
visible: true
type: home
class: com.example.templates.CustomTemplateDefinition
modelClass: com.example.templates.HomePageModel
Localtab
titleJCR node
Advanced Tables - Table Plus
heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue

Mgnl f
templates

 


Mgnl f
pages

 

Mgnl n
home

 


Mgnl n
areas

 


Mgnl n
<area definitions>

 


Mgnl p
class

com.example.templates.CustomTemplateDefinition

Mgnl p
dialog

my-module:pages/homePageProperties

Mgnl p
modelClass

com.example.templates.HomePageModel

Mgnl p
renderType

freemarker

Mgnl p
templateScript

/my-module/templates/pages/home.ftl

Mgnl p
type

home

Mgnl p
visible

true

...

Advanced Tables - Table Plus
heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue

Mgnl n
templates

 

Mgnl n
availability

 

mgnlmgnl-p
class

 com.example.myModule.site.CustomTemplateAvailability

...

Localtab Group
Localtab
activetrue
titleYAML file (fragment)
Code Block
languagejs
areas:
  myArea:
    availableComponents:
      textImage: 
        id: my-module:components/textImage
      html: 
        id: my-module:components/HTML
        roles:
          - superuser
        # could also be written as
        # roles: [superuser]
Localtab
titleJCR node
Advanced Tables - Table Plus
heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue

Mgnl n
article

 


Mgnl n
areas

 


Mgnl n
myArea

 

Mgnl n
availableComponents

 


Mgnl n
textImage

 

Mgnl p
id

my-module:components/textImage

Mgnl n
html

 


Mgnl n
roles

 


Mgnl p
superuser

superuser

Mgnl p
id

my-module:components/HTML

...

Localtab Group
Localtab
activetrue
titleYAML file (fragment)
Code Block
languagejs
areas:
  myArea:
    availableComponents:
      maxComponents: 5
      renderType: freemarker
      type: list
Localtab
titleJCR node
Advanced Tables - Table Plus
heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue

Mgnl n
areas

 


Mgnl n
myArea

 


Mgnl n
availableComponents

 


Mgnl p
maxComponents

5

Mgnl p
renderType

freemarker

Mgnl p
type

list

...

You can restrict the actions that editors can take on a component in the component definition using the deletable, writable, and moveable properties, and in Magnolia EE Pro also the personalizable property moveable and personalizable (EE Pro) properties. By default, all components can be deleted, edited, moved, and personalized but you can change this behavior by setting these properties to false

Localtab Group
Localtab
activetrue
titleYAML file (fragment)
Code Block
languagejs
titlemy-module/templates/components/html.yaml
renderTypedeletable: falsefreemarker
writable: false
moveable: false
personalizable: falsetemplateScript: /my-module/components/html.ftl
dialog: my-module:components/html
renderType
deletable: false
writable: false
moveable: freemarkerfalse
templateScriptpersonalizable: /my-module/components/html.ftlfalse
Localtab
titleJCR node
Advanced Tables - Table Plus
heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue

Mgnl n
html

 

Mgnl p
deletable

false

Mgnl p
writable

false

Mgnl p
moveable

false

Mgnl p
personalizable

false

Mgnl p
dialog

my-module:components/html

Mgnl p
renderType

freemarker

Mgnl p
templateScript

/my-module/components/html.ftl

...

Localtab Group
Localtab
activetrue
titleYAML file (fragment)
Code Block
languagejs
areas:
  myArea:
    availableComponents:
      myComponent:
        id: my-module:components/myComponent
        permissions:
          write:
            roles: [editors, superuser]
          move:
            roles: [senior-editor, superuser]
          delete:
            roles: [editors, superuser]
          personalize:
            roles: [senior-editor, superuser]
Localtab
titleJCR node
Advanced Tables - Table Plus
heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse
Node nameValue

Mgnl n
areas

 

Mgnl n
myArea

 

Mgnl n
availableComponents

 


Mgnl n
myComponent

 


Mgnl n
permissions

 

Mgnl n
write

 


Mgnl n
roles

 


Mgnl p
editors

editors

Mgnl p
superuser

superuser

Mgnl n
move

 

Mgnl n
roles

 

Mgnl p
senior-editors

senior-editors

Mgnl p
superuser

superuser

Mgnl n
delete

 

Mgnl p
senior-editors

senior-editors

Mgnl p
superuser

superuser

Mgnl n
personalize

 

Mgnl n
roles

 

Mgnl p
senior-editors

senior-editors

Mgnl p
superuser

superuser

Mgnl p
id

my-module:components/myComponent

...

permissions

optional

Required parent item that contains the action restrictions.

<write|move|delete|personalize>

optional

Action to which the restriction applies. (personalize is available only in Magnolia EE Pro)

roles

required

Note that roles must be added as list in the YAML file. (See YAML-Lists).

<roleName>

required

identifies Identifies the role. The name of the attribute is arbitrary but the value must match an existing role