On Tue, Mar 9, 2010 at 12:43 PM, Pierce T. Wetter III <pie...@paceap.com> wrote: > > On Mar 9, 2010, at 12:15 PM, Robert Zeigler wrote: > >> t:contnt is what you want. It's not a component, it is it's own xml tag. So, >> either: >> >> <html> >> <body> >> <t:content> >> stuff you want in here >> </t:content> >> </body> >> </html> >> >> Or: >> >> <html> >> <t:content> >> <body> >> ... >> </body> >> </t:content> >> </html> >> >> Former will exclude html + body in the final rendered page. >> Latter will exclude html, but include body in the final rendered page. > > Yeah, so I guess this is a 5.2 feature request then. > > There's t:remove and t:content, which you can use to make components > "previewable". Then there's t:type ="stuff", which surprisingly, doesn't > support type="remove", or type="content". > > Seems like t:type="ignore" and t:type="remove" would be nice, then you could > do > > <html t:type="ignore"> > <body t:type="ignore"> >
Ok, the deal is that t:type is used to identify the actual component type (the type name is resolved to a component class name). T5 already has some magic elements, a.k.a. directives, such as t:body, t:parameter, t:block, t:content and t:remove. I don't want to introduce magic component types as well. The fact that you can do <t:textfield> rather than <input t:type="textfield"> came later, and is an ease of use optimization. I think it makes the templates look nice, it mimics a common approach used in T4 and it's very concise. > <p t:type="remove"> This is a my cool component. You can use it by...</p> > > <div t:type="content"> > <!--- component stuff here. --> > </div> > > </body> > </html> > > That is, you could put the documentation for using the component in the > template for the component. > > Just a suggestion that it would be cool to extend the invisible > instrumentation, one of the reasons I chose Tapestry was the ability to take > a page an artist mocked up and turn it into a dynamic page. It would be nice > to go the other way more easily. > > Pierce > > > > -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org