[magnolia-dev] [JIRA] (DOCU-1040) Fallbacking of ${content.windowTitle!content.title!} in i18n-ized content
JIRA (on behalf of Martin Drápela) <jira-O8DnXSz/[email protected]>
| Newsgroups | gmane.comp.cms.magnolia.devel |
|---|---|
| Message-ID | <[email protected]> |
Martin Drápela updated an issue
Documentation / https://jira.magnolia-cms.com/browse/DOCU-1040 DOCU-1040
Fallbacking of ${content.windowTitle!content.title!} in i18n-ized content
Change By:
Martin Drápela
The mgnl CLI (2.1.0) command
{noformat}
mgnl create-page hello
{noformat}
will produce a FreeMarker file where the <title> element for the page is generated in the following way:
{noformat}
<title>${content.windowTitle!content.title!}</title>
{noformat}
From the author perspective, the command should default to the content of _title_ if nothing is found for _windowTitle_.
In an i18n-ized project, however, this may be rather tricky: The resolver may actually provide a fallback _windowTitle_ value from the JCR instead of the FreeMarker default _title_, even though the content for the _title_ does exist for the given language version of the page.
Thus, under the following definition of page properties,
*The English variant:*
- title:
- windowTitle: This is the homepage
*The German variant:*
- title: "Dies ist die Homepage."
- windowTitle:
the <title> element in the German version will be rendered with the English "This is the homepage".
This could be documented somewhere (i18n / mgnl-cli).
Q for the DEVs: Could this behavior be fixed by making _windowTitle_ a child of _title_ in the class and, consequently, modifying also the print command to fallback to the parent?
https://jira.magnolia-cms.com/browse/DOCU-1040#add-comment
Add Comment
This message was sent by Atlassian JIRA (v7.2.6#72008-sha1:26175bf)
----------
----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
(unnamed)
(image/png, 751 B) - not displayed
(unnamed)
(image/png, 1.1 KB) - not displayed
(unnamed)
(image/png, 468 B) - not displayed
(unnamed)
(image/png, 2.9 KB) - not displayed