[
https://issues.apache.org/jira/browse/WW-4145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13877752#comment-13877752
]
Lukasz Lenart commented on WW-4145:
-----------------------------------
{{${parameters.expandTheme}}} is a recurrence which tells ThemeManager to load
template from current theme and then from parent theme (defined in
theme.properties) and so on.
Please also notice that the ThemeManager builds list of possible templates
based on current theme and inherited themes (/template/custom/textarea.ftl,
/template/xhtml/textarea.ftl, /template/simple/textarea.ftl). This also true
for templates which are loaded via {{${parameters.expandTheme}}}.
One thing, the textarea.ftl in xhtml theme is defined as follow:
{code:xml}
<#include
"/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
<#include "/${parameters.templateDir}/simple/textarea.ftl" />
<#include
"/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" />
{code}
So it contains {{${parameters.expandTheme}}} already, so if you want to just
override those, define them in your custom theme and ThemeManager will pick
them up. You don't have to write custom textarea.ftl.
It looks complicated but it's quite simple ;-) If still something is unclear,
don't hesitate to ask.
PS: can you reedit your comment above and correct {{code:title:new}} to
{{code:title=new}}, thanks!
> file.ftl in xhtml theme directly references xhtml controlfooter.ftl
> -------------------------------------------------------------------
>
> Key: WW-4145
> URL: https://issues.apache.org/jira/browse/WW-4145
> Project: Struts 2
> Issue Type: Bug
> Components: Other
> Affects Versions: 2.3.15.1
> Reporter: Jasper Rosenberg
> Assignee: Lukasz Lenart
> Labels: freemarker, tags, xhtml
> Fix For: 2.3.16
>
> Attachments: ThemeExpansion-Alt.patch, ThemeExpansion.patch
>
>
> Should use $\{parameters.theme} instead so can be used in theme extension.
> {code}
> <#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl"
> />
> <#include "/${parameters.templateDir}/simple/file.ftl" />
> <#include "/${parameters.templateDir}/${parameters.theme}/controlfooter.ftl"
> />
> {code}
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)