You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Christian Oldiges <c....@web.de> on 2002/08/22 22:43:52 UTC
How to access current Tiles definition name?
Hi!
Is it possible to retrieve the tiles definition name within a JSP that
is part of the currently processed definition?
Example:
<definition name="rootLayout" path="/layouts/rootLayout.jsp">
<put name="menu" value="/tiles/menu.jsp" />
<put name="content" value="/tiles/content/empty.jsp" />
<put name="rightBar" value="/tiles/newsbar.jsp" />
</definition>
<definition name="site.page1" extends="rootLayout" >
<put name="title" value="blabla" />
<put name="content" value="/tiles/content/page1.jsp" />
</definition>
<definition name="site.page2" extends="rootLayout" >
<put name="title" value="blabla" />
<put name="content" value="/tiles/content/page2.jsp" />
</definition>
Now within "/tiles/menu.jsp" I want to find out which tiles definition
is active. "site.page1" or "site.page2"
TIA,
Christian
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: How to access current Tiles definition name?
Posted by Cedric Dumoulin <ce...@apache.org>.
Hi,
There is no way to retrieve the current definition name.
The actual solution is to add an attribute identifying the definition.
Hope this help,
Cedric
Christian Oldiges wrote:
> Hi!
>
> Is it possible to retrieve the tiles definition name within a JSP that
> is part of the currently processed definition?
>
> Example:
>
> <definition name="rootLayout" path="/layouts/rootLayout.jsp">
> <put name="menu" value="/tiles/menu.jsp" />
> <put name="content" value="/tiles/content/empty.jsp" />
> <put name="rightBar" value="/tiles/newsbar.jsp" />
> </definition>
>
> <definition name="site.page1" extends="rootLayout" >
> <put name="title" value="blabla" />
> <put name="content" value="/tiles/content/page1.jsp" />
> </definition>
>
> <definition name="site.page2" extends="rootLayout" >
> <put name="title" value="blabla" />
> <put name="content" value="/tiles/content/page2.jsp" />
> </definition>
>
> Now within "/tiles/menu.jsp" I want to find out which tiles definition
> is active. "site.page1" or "site.page2"
>
> TIA,
> Christian
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>