Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: MOTION-157

...

Example: Site definition for the Travel Demo site that ships with Magnolia (partial example).

...

heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse

...

Mgnl n
travel

...

Mgnl n
templates

...

Mgnl n
availability

...

Mgnl n
templates

...

Mgnl n
home

...

Mgnl p
id

...

Mgnl n
prototype

...

Mgnl n
areas

...

Mgnl n
navigation

...

Mgnl n
footer

...

Mgnl n
main

...

Mgnl n
jsFiles

...

Mgnl n
theme

...

Mgnl p
name

...

travel-demo-theme

...

Mgnl n
i18n

...

Mgnl p
class

...

Mgnl p
enabled

...

Mgnl n
locales

...

Mgnl n
en

...

Mgnl p
country

...

Mgnl p
enabled

...

Image Added

...

Mgnl p
language

...

Mgnl n
de

Nodes and properties:

templates

optional

prototype

optional

The template prototype is a master template definition which applies to the whole site. Anything you configure in the prototype is applied to all page templates. 

availability

optional

Template availability defines which page templates are available to editors in the Pages app. There are more ways to control page template availability.

enabled

optional, default is true

Enables and disables the site definition.

domains

optional

Maps domain names to the site. Requires the Multisite module (DX Core).

theme

optional

Reference to a theme that defines the look and feel of the site. Themes are configured in config:/site/config/themes.

i18n

optional

Locale configuration and support for entering and serving content in multiple languages.

When configuring the i18n node, make sure to provide the properties class and enabled.

class

required (when using i18n)

For instance use info.magnolia.cms.i18n.DefaultI18nContentSupport.

enabled

optional, default is false
mappings

optional

URI mappings that define which node in a workspace should be served when a particular URI is requested.

parameters

optional

Custom template properties that you can access from a script without having to write a class.

variations

optional

Variations adapt the site for different devices or geographical locations.

...

Example: Choosing travel as a fallback site definition in /modules/multisite/config/sites :

...

heading0
multiplefalse
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse

...

Mgnl n
fallback

...

Mgnl p
extends

...

Mgnl n
travel

Mgnl n

...

Image Added