If you're going to start a new project you can use Tapestry 5.1.
A new special tag was introduced to do precisely what you want: <t:content>.

There's more information in the Tapestry documentation:
http://tapestry.apache.org/tapestry5.1/guide/templates.html

Simple example:
- Border template:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xmlns:t="
http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
   <head>
      [...]
   </head>
   <body>
      [...]
      <t:body />
      [...]
   </body>
</html>

- Page template
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xmlns:t="
http://tapestry.apache.org/schema/tapestry_5_1_0.xsd";>
   <head>
      [...]
   </head>
   <body>
      [...]
      <t:content>
         Page content goes here!
      </t:content>
      [...]
   </body>
</html>

regards,

Onno


On Fri, May 29, 2009 at 3:45 PM, Angelo Chen <angelochen...@yahoo.com.hk>wrote:

>
> Hi,
>
> I'm going to start a new project and I'd like to use approaches that will
> make tml file previewable, I know, instead of <t:pagelink ...> I'd rather
> use  , is there any other approaches? one thing I find it difficult is, I
> have a layout component and css is included in the layout component, and
> all
> the pages in the project 'inherited' from that layout component, it is
> previewable, but the css is not included and the end result of previewing
> does not really look good, any idea how to make css in the layout also
> available to the 'inherited' pages? thanks,
>
> Angelo
> --
> View this message in context:
> http://www.nabble.com/t5%3A-previewability-tp23780335p23780335.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to