struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (JIRA)" <>
Subject [jira] [Commented] (WW-4145) file.ftl in xhtml theme directly references xhtml controlfooter.ftl
Date Tue, 21 Jan 2014 19:13:22 GMT


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 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:
<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
<#include "/${parameters.templateDir}/simple/textarea.ftl" />
<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" />

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}},

> file.ftl in xhtml theme directly references xhtml controlfooter.ftl
> -------------------------------------------------------------------
>                 Key: WW-4145
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions:
>            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

View raw message