Magnolia 5.3 reached end of life on June 30, 2017. This branch is no longer supported, see End-of-life policy.
You can manage many websites on a single Magnolia instance, a feature called multisite. A site definition makes each site unique. In a site definition you configure what templates are available on the site, what theme gives the site its look and feel, and what domain name the site has. These things make the site stand out from other sites. One site definition can also extend another site definition, allowing you to reuse work already done.
See Pricing for more information.
Go to STK > Site Definitions to access the site definitions.
Community Edition allows one site
Node name |
---|
templates |
prototype |
availability |
theme |
variations |
Enterprise Edition Pro allows many sites.
Node name |
---|
default |
templates |
prototype |
availability |
theme |
variations |
i18n |
label |
demo-project |
demo-features |
demo-project-de |
Both editions have full i18n support. The i18n
node an EE site definition makes multisite i18n possible.
The /templates
node contains two configurations:
/prototype
: The template prototype configuration discussed in the next section./availability
. This content node determines what templates authors can use on content pages. The concrete page templates configured in STK > Template Definitions /pages
are made available to the default site:id
property has a <module name>:<path to definition>
structure and it is possible to include templates configured in any module, not only the STK. In the EE, because this configuration is in the default
site definition the templates are automatically available to all other sites, for example demo-project
, because the site definitions extend the default
definition.It is also possible to restrict template access by roles
. Add a roles
content node under the <template name>
node with a single property with the same name and value as the role set up in the Roles tab in the Security app .For more information see Roles.
Node name | Value |
---|---|
default | |
templates | |
prototype | |
availability | |
templates | |
stkHome | |
roles | |
superuser | superuser |
id | standard-templating-kit:pages/stkHome |
stkSection | |
id | standard-templating-kit:pages/stkSection |
stkArticle | |
stkLargeArticle | |
stkNews |
4.5.9+ If you have a custom template availability class, replace occurrences of
template.getName()
with template.getId()
. Since Magnolia 4.5.9, the id
property is exposed to
TemplateConfig
. Prior to 4.5.9 the name of the template node was exposed instead.
Template availability, in the sense that not all templates are available at all page levels, is also controlled by the category assigned to the individual templates in the concrete template definitions. For more information on the site hierarchy see Categories and subcategories.
The /theme
node assigns the default pop
theme to the site definition using the name
property. A theme defines a site's look and feel, as well as its JavaScript functionality. Themes are configured in STK > Themes. A variation can use its own theme. pop
is the default theme used by all sites unless another is assigned in an EE site definition or in in a variation.
Node name | Value |
---|---|
default | |
templates | |
theme | |
name | pop |
variations |
As the name suggests, a variation
is a varied form of the prototype. In the demo sites it is used to reformat content suitable for output on a smartphone, but is not limited to this. You can for example configure variations for tablet, web-TV, PDF formats, or specific output for groups of logged in users. See Channels for more information. The smartphone
variation is discussed in detail on the Mobile page.
The /variations
node contains the configurations for all variations of the site. For each variation you can:
Assign a theme that is different to the default pop
theme.
Node name | Value |
---|---|
default | |
templates | |
theme | |
variations | |
smartphone | |
templates | |
prototype | |
navigation | |
areas | |
theme | |
name | pop-mobile |
See Multisite.
Magnolia offers internationalization support on three levels: content, system and authoring. You can view the i18n
configurations in the Configuration app > /server/i18n
.
In the EE the content
server configuration relies on the ETKI18nContentSupport
Java class that provides additional i18n support for multiple sites. This class delegates to the i18n support configured in a site definition.
Node name | Value |
---|---|
server | |
filters | |
IPConfig | |
i18n | |
content | |
class | info.magnolia.multisite.i18n.MultiSiteI18nContentSupport |
enabled | true |
system | |
authoring |
In STK > Site Definitions the /default/i18n
node defines the fall-back internationalization settings for the default
site definition. Other site definitions can modify these settings allowing specific sites to have different settings. Within the /i18n
node the following are set:
/defaultLocale
sets the language rendered by default./fallbackLocale
sets the language used in the absence of translated content./class
is set to DefaultI18nContentSupport
, the same Java class used by the CE./locales
contains the configurations of as many individual languages as necessary.
Node name | Value |
---|---|
default | |
templates | |
theme | |
variations | |
i18n | |
locales | |
en | |
country | |
enabled | true |
language | en |
de | |
class | info.magnolia.cms.i18n.DefaultI18nContentSupport |
defaultLocale | en |
enabled | true |
fallbackLocale | en |
Throughout the system languages are indicated by a two letter identifier, en
(English) and de
(German) in the example here.
In the CE, content authoring is configured in the Configuration app > /server/i18n/content
. This configuration sets the /fallbackLocale
and individual language locales
in the same way as the EE. DefaultI18nContentSupport
is the same Java class used by the EE in the site configuration. The defaultLocale
property is unnecessary as multiple sites are not possible. By default the enabled
property is set to false
and should be changed to true
to enable multilingual content entry in the editing interface.
Node name | Value |
---|---|
server | |
filters | |
IPConfig | |
i18n | |
content | |
locales | |
en | |
de | |
class | info.magnolia.cms.i18n.DefaultI18nContentSupport |
enabled | false |
fallbackLocale | en |
system | |
authoring |
Other than those indicated above, i18n server configurations are the same in both editions.
In the editing interface editors can select the relevant language for content editing in a dropdown in the top bar. Language indicators are also included in all dialogs next to the field label.
For more information see Language configuration and Multilanguage structure.
See URI to repository mapping.
Footnotes