tiles-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergio del Amo Caballero <se...@sbox.tugraz.at>
Subject ┬┐variables, external definitions?
Date Wed, 09 May 2007 09:09:28 GMT
hello,

I am using tiles together with struts to build a web application. This
web application will have different themes. Basically i would like to
know if it is possible to declare a variable inside tiles definition
file or access a MessageResource definition from the tiles-def.xml file.

As it is shown in the example below, i have to write directly in almost
every line what theme i am using e.g. themeA. Instead i would like to be
able to reference a variable such as themeName, where i define the theme
that i want to use.

 <!DOCTYPE tiles-definitions PUBLIC
       "-//Apache Software Foundation//DTD Tiles Configuration//EN"
       "http://jakarta.apache.org/struts/dtds/tiles-config.dtd">

<tiles-definitions>

  <definition name=".login" path="/themes/themeA/jsp/login.jsp"/>

  <definition name=".baseDef" path="/themes/themeA/jsp/template.jsp">
        <put name="title"    value="Base Template Page" />
        <put name="header"   value="/themes/themeA/velocity/header.vm" />
        <put name="content"  value="/themes/themeA/jsp/baseContent.jsp" />
        <put name="footer"   value="/themes/themeA/jsp/footer.jsp"/>
  </definition>

  <definition name=".homePage" extends=".baseDef">
      <put name="title" value="Home" />
      <put name="content" 
value="/themes/themeA/velocity/homePageContent.vm" />
  </definition>

<tiles-definitions>


thanks for you future feedback,
Sergio del Amo

Mime
View raw message