on 2019 Mar 07 12:34 PM
Request clarification before answering.
Instead of ${ctx.messages.getMessage(${ctx.dateTool.getYear()})}, just try one of the following:
$ctx.dateTool.getYear()
or
${ctx.dateTool.getYear()}
or
$ctx.dateTool.get('yyyy')
or
$ctx.dateTool.format('yyyy', $ctx.dateTool)
As per the DateTool documentation, the default key is date [@DefaultKey(value="date")] and therefore, you can even try
$date.get('yyyy')
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
yes i tried with this line $ctx.dateTool.getYear() it is working fine in one vm file but while adding in the footer.vm where the code is in tag then it is not working . Do you know about this thing Or may be i have defined in some tags ... Even i tried with this way also #set ( $year = $ctx.dateTool.getYear()) and $year defined in that particular place this type also working in messgaebody.vm but not working in footer.vm
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.