You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by mosho <ro...@gmail.com> on 2006/07/31 21:18:51 UTC
how to call other tiles from baselayout
I have a problem. I am using tiles for my layout.
I have a baselayout.jsp where I am inserting all my header, body and footer
tags.
I want to insert another attribute called breadcrumbs which have some insert
statements. for example,
my tile definition is:
<definition name="baseLayout" path="/templates/baseLayout.jsp" >
<put name="pageTitle" value="Watershed Planning" type="string" />
<put name="header" value="/templates/header.jsp" type="page" />
<put name="breadcrumb" value="/templates/breadcrumbs.jsp" type="page" />
<put name="footer" value="/templates/footer.jsp" type="page" />
<put name="pagecontent" value="/wspb_planbuilderintro.jsp" />
</definition>
Can i do this in my base layout:
<tiles:insert attribute="breadcrumbs" >
<tiles:put name="pageTitle" beanName="pageTitle" beanScope="tile" />
</tiles:insert>
Value of breadcrumbs is another jsp file:
<li><tiles:getAsString name="pageTitle" /></li>
Thanks
--
View this message in context: http://www.nabble.com/how-to-call-other-tiles-from-baselayout-tf2029501.html#a5582228
Sent from the Struts - User forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: how to call other tiles from baselayout
Posted by Antonio Petrelli <br...@tariffenet.it>.
mosho ha scritto:
> I have a problem. I am using tiles for my layout.
> I have a baselayout.jsp where I am inserting all my header, body and footer
> tags.
>
> I want to insert another attribute called breadcrumbs which have some insert
> statements. for example,
> my tile definition is:
>
> <definition name="baseLayout" path="/templates/baseLayout.jsp" >
> <put name="pageTitle" value="Watershed Planning" type="string" />
> <put name="header" value="/templates/header.jsp" type="page" />
> <put name="breadcrumb" value="/templates/breadcrumbs.jsp" type="page" />
> <put name="footer" value="/templates/footer.jsp" type="page" />
> <put name="pagecontent" value="/wspb_planbuilderintro.jsp" />
> </definition>
>
> Can i do this in my base layout:
> <tiles:insert attribute="breadcrumbs" >
> <tiles:put name="pageTitle" beanName="pageTitle" beanScope="tile" />
> </tiles:insert>
>
Just to clear things, do you need to replace the "pageTitle" or your
"breadcrumb" attribute? Anyway if you want to replace the "pageTitle"
attribute you need to do this way:
<tiles:insert definition="baseLayout">
<tiles:put name="pageTitle" beanName="pageTitle" beanScope="tile" />
</tiles:insert>
HTH
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org