[ http://issues.apache.org/struts/browse/WW-1328?page=comments#action_37603 
] 

Rainer Hermanns commented on WW-1328:
-------------------------------------

Nope, it is not that trivial...

I tried it locally, but there is a problem with the parse directive, trying to 
embed unavailable files within the different themes.
#parse does use the ${parameters.templateDir} but does not know what to use, if 
the requested file is not available.

If we want to address this problem these might be pssoble solutions:
o every theme has to include all template files so that the above parameter 
works as expected.
   If a template is inherited, just use it as a wrapper for a parse call to the 
correct ('super') theme template file.

o rewrite or implement an "intelligent" parse macro, that takes the 
$parameters.templateDir as a default and tries to lookup 
   the theme inheritence hierarchy until the named file is found

What do you think?

Rainer

> xhtml theme is hardcoded to use xhtml/controlfooter for all templates
> ---------------------------------------------------------------------
>
>          Key: WW-1328
>          URL: http://issues.apache.org/struts/browse/WW-1328
>      Project: Struts Action 2
>         Type: Bug

>   Components: Views
>     Versions: WW 2.2.2
>     Reporter: Nick Hill
>     Assignee: Don Brown
>      Fix For: 2.0.0

>
> If you look at one of the xhtml themes, for example, text.ftl, it is hard 
> coded to use the xhtml controlfooter. This poses a problem for overridding 
> the theme.
> Example xhtml/text.ftl:
> <#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" 
> />
> <#include "/${parameters.templateDir}/simple/text.ftl" />
> <#include "/${parameters.templateDir}/xhtml/controlfooter.ftl" />
> Notice the controlfooter does not use ${parameters.theme} but rather is hard 
> coded to xhtml. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to