t:container doesn't exclude it's children. Tapestry templates have to
be valid xml documents. That means there has to be a single root
element. It's often inconvenient to have to have such a single root
element in components. Imagine, for example, a component that renders
a subset of cells of a table row; you don't want to surround that
with, eg, a div, because the div will be output, as well, and that
would result in invalid (x)html (or, at the very least, semantically
incorrect (x)html), along the lines of: <tr><div><td></td>...</div></
tr> (div's aren't supposed to go around td's).
<t:container> was created to circumvent the problem, by providing a
"root" element which won't be rendered (so you would do:
<t:container><td>...</td>...</t:container> in the above example). As
a side effect, some users have reported that content outside of the
<t:container> element isn't rendered. I haven't duplicated that
behavior. And it's quite contrary to what <t:container> is supposed
to do, since it's supposed to be a root element.
Short answer is that there is currently /no/ equivalent in T5 of
$content$
Robert
On Jun 1, 2008, at 6/17:50 PM , Andrew Pietsch wrote:
Hi Robert,
Thanks for that. As I see it <t:container> seems to be the inverse
of what
I want. It excludes it's children from the output, whereas $content$
excludes everything but its children from the output.
Does anyone know if the equivalent functionality is planned?
Cheers
Andrew
On Mon, Jun 2, 2008 at 9:51 AM, Robert Zeigler <[EMAIL PROTECTED]>
wrote:
$content$ is NOT the same as <t:body />
<t:body> is the equivalent to the T3 "RenderBody" component.
The closest thing to $content$ is <t:container>, but even that
isn't quite
the same thing as $content$.
Robert
On Jun 1, 2008, at 6/16:07 PM , Marcus wrote:
Hi Andrew,
$content$ = <t:body /> (
http://tapestry.formos.com/nightly/tapestry5/tapestry-core/guide/templates.html
)
for $remove$ you can use t5components/remove or search on list for
"public
class Remove"
Marcus
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]