Hello,
I have created a user macro that needs to print the following HTML tag:
## @noparams
<input type="hidden" name="xxx" id="xxx" value="$content.getTitle()" />
The user macro is then rendered in the page via the following expression placed in the Main Decorator of my space layout soon after the <body> tag:
...
<body #onLoadAttr() id="com-atlassian-confluence" class="$!theme.bodyClass $!sitemeshPage.getProperty("page.bodyClass") aui-layout aui-theme-default">
$helper.renderConfluenceMacro("{myusermacro}")
...
This is, in theory, okay and I should expect to have the content title printed out as in the value attribute of my <input> tag.
However, for some reasons, the $content.getTitle() expression is not rendered in the HTML and what I get in my page HTML source code is the following output:
...
<body #onLoadAttr() id="com-atlassian-confluence" class="$!theme.bodyClass $!sitemeshPage.getProperty("page.bodyClass") aui-layout aui-theme-default">
<input type="hidden" name="xxx" id="xxx" value="$content.getTitle()" />
...
Instead of:
...
<body #onLoadAttr() id="com-atlassian-confluence" class="$!theme.bodyClass $!sitemeshPage.getProperty("page.bodyClass") aui-layout aui-theme-default">
<input type="hidden" name="xxx" id="xxx" value="My Page Title" />
...
Please, can you help me solve this mystery?
Many thanks!