struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lukasz Lenart <lukaszlen...@apache.org>
Subject Re: Theme support
Date Tue, 16 Jul 2013 09:40:09 GMT
If there be no objections, I will change all ${parameters.theme} to
hardcoded value - but I don't know how thus will affect users :\

2013/7/16 Lukasz Lenart <lukaszlenart@apache.org>:
> Hi,
>
> I have been digging into Theme support in S2 and have some doubts.
> First of all to use a new theme globally (via struts.ui.theme
> property), theme must implement all the tags - thus can be simple
> solved by copping parent's files into new theme. It's because many
> tags uses ${parameters.theme} which is passed directly to Freemarker
> and we cannot control path resolution any more.
>
> ie. /template/css_xhtml/text.ftl
>
> <#include "/${parameters.templateDir}/${parameters.theme}/controlheader.ftl" />
> <#include "/${parameters.templateDir}/simple/text.ftl" />
> <#include "/${parameters.templateDir}/css_xhtml/controlfooter.ftl" />
>
> and when I want to create a new theme called myTheme, with new version
> of just one tag (checkboxlist.ftl), but I will be using also text.ftl
> (without modification), Freemarker will be try to load
> /template/myTheme/controlheader.ftl (because of <#include/>
> statement), but when the text.ftl will be changed to:
>
> <#include "/${parameters.templateDir}/css_xhtml/controlheader.ftl" />
> <#include "/${parameters.templateDir}/simple/text.ftl" />
> <#include "/${parameters.templateDir}/css_xhtml/controlfooter.ftl" />
>
> there be no problem with extending and overriding just one tag.
>
> Does anyone know what was the idea to use ${parameters.theme} instead
> of hardcoded path?
>
> For curiosity, text.ftl contains <#--include
> "/${parameters.templateDir}/css_xhtml/controlheader.ftl" / --> (as you
> can see, it is commented out)
>
>
> Regards
> --
> Ɓukasz
> + 48 606 323 122 http://www.lenart.org.pl/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message