Versions Compared

Key

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

...

Multiexcerpt
MultiExcerptNamemodel-properties

The model itself provides the following built-in properties:

  • parent: Model of the parent component or template.
  • root: Top root model of the rendering process.
  • content: Content node bound to the model in the rendering context provided as a ContentMap.
  • node: Content node bound to the model in the rendering context provided as a Node.
  • definition: The renderable definition (template, area or component) bound to the model. Same as 145308616def.

These properties can referenced like this:

...

Multiexcerpt
MultiExcerptNamectx_more-infos

The 

Javadoc resource link
classNameinfo.magnolia.context.Context
renderTypeasynchronous
 interface provides access to:

  • user (
    Javadoc resource link
    classNameinfo.magnolia.cms.security.User
    renderTypeasynchronous
    )
  • locale (java.util.Locale)

    Info

    Please note that ${ctx.locale} is different from ${cmsfn.language()}, the former referring to the locale currently used by the user, the latter to the locale currently used by the site. See also AdminCentral and public locales.

In addition, 

Javadoc resource link
classNameinfo.magnolia.context.WebContext
renderTypeasynchronous
 provides access to:

WebContext properties are null if the execution is not a Web page request.

...

Multiexcerpt
MultiExcerptNamestate_more-infos

Provides access to many properties as:

  • channel (
    Javadoc resource link
    classNameinfo.magnolia.cms.core.Channel
    renderTypeasynchronous
    )
  • originalURI
  • currentURI
  • queryString
  • mainContentNode (javax.jcr.Node)
  • templateName
  • locale (the same as ctx.locale)
  • etc.

Read the javadoc (

Javadoc resource link
classNameinfo.magnolia.cms.core.AggregationState
renderTypeasynchronous
) for all the properties.

Please note that the values of all the properties are HTML-escaped by default. Should you need it, the raw (unescaped) data can still be accessed in the following manner:

${state.unwrap().originalURI}

However, be warned that this may expose your webapp to XSS attacks.


i18n

A message bundle wrapper (

Javadoc resource link
classNameinfo.magnolia.freemarker.MessagesWrapper
renderTypeasynchronous
) to retrieve translated keys of a message bundle according to the current java.util.Locale.

...