2009/10/13 Johannes Kuhs <[email protected]>

> The following content should be inserted:
> <div>This is the initial content</div>
> <div>This text gets appended to the initial content of the body
> attribute</div>
> ...
> In your opinion, what would be the best way to achieve this? Also,
> what do you think about the idea of adding an "inherit" attribute for
> the "putAttribute" tag? The same functionality already exists for
> lists so I think it would make sense to have it for normal attributes
> as well, wouldn't it?
>

I think that lists inheritance is great in this sense.

In your templates put this:

<tiles:importAttribute name="myList" />
<c:forEach var="attribute" items="${myList}">
  <tiles:insertAttribute value="${attribute}" />
</c:forEach>

And create in your Tiles definitions a base list attribute and an extended
one.

HTH
Antonio

Reply via email to