Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: MAGNOLIA-8348 (mgnl 5.7.18 release)

...

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:

  • aggregationState (
    Javadoc resource link
    classNameinfo.magnolia.cms.core.AggregationState
    renderTypeasynchronous
    )
  • contextPath (current context path)
  • request (javax.servlet.http.HttpServletRequest)

Any ctx attributes (request, session or application scoped) listed under config:server/rendering/engine/protectedAttributes are not exposed (unconfigured attributes default to that list). You can customize the list by importing and adjusting the default config.server.rendering.engine.protectedAttributes.yaml.

Code Block
languageyml
titleconfig.server.rendering.engine.protectedAttributes.yaml
'protectedAttributes':
  'servletContext': 'servletContext'
  'javax.security.auth.Subject': 'javax.security.auth.Subject'
  'com.vaadin.server.VaadinSession.Admincentral': 'com.vaadin.server.VaadinSession.Admincentral'

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

...