THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlheader.ftl" />
<#include "/${parameters.templateDir}/simple/xxx.ftl" />
<#include "/${parameters.templateDir}/${parameters.expandTheme}/controlfooter.ftl" />
|
...
Code Block | ||
---|---|---|
| ||
parent = xhtml
|
An extended theme does not need to implement every single template that the Struts Tags expect. It only needs to implement the templates that change. The other templates are loaded from the parent template.
...
Using expandTheme
parameter allows to override only some parts of the theme's templates, e.g. css.ftl. You can define a new theme (set theme.properties) and override just single file.
See also example Struts 2 Themes or Creating a Theme in Struts 2 (Mark Menard)