Versions Compared

Key

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

...

Returns a map of localized links to the current node. This means: If you have defined three locales en, de_DE and de_CH the function returns localized links to the node of the context on which you are applying the function. (If the current content node is a component, the function searches the parent page node.) (warning)  Magnolia 5.4.1+

Example: The map could look like this:

...

Checks whether the content is requested in the page editor in edit mode on author instance.

Method signature

boolean isEditMode()

...

Checks whether the content is requested in the page editor in preview mode.

...

cmsfn.isPreviewMode() returns True in public instance. To confirm this you can use

...

The check can be run either on the author instance or on the public instance.

Method signature

boolean isPreviewMode()

...

Code Block
languagexml
[#assign queryStringAndFragment = cmsfn.queryStringAndFragment("http://example.com#myApp::running?q=abcd")]
Query string and fragment: ${queryStringAndFragment}

Language

See also Get localized links above.

Current language

Retrieves the language currently used.

...

Code Block
languagexml
<html xml:lang="${cmsfn.language()}" lang="${cmsfn.language()}" class="no-js">
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.

Wrap content in i18n node wrapper

...