Rodney Schneider <[EMAIL PROTECTED]> wrote: >On Thu, 16 Jan 2003 03:55, you wrote: > >> I had added a hack^H^H^H^Hfeature to my customized Layout to enable >> layouts to be embedded within other layouts. This way you can have a >> standard layout containing just the basic HTML HEAD and BODY tag >> stuff, and then reuse that layout in other layouts. ><snip> >> Note that the embedding does not involve looking up the Layout class >> for the template that is being embedded in. This is only for reusing >> content. >> Does this idea appeal to anyone for general use in Turbine? > >I think I'm missing something, but can't you just embed a Navigation >template with the "basic" stuff mentioned above into the header and >footer parts of your Layout templates? Could you explain why you need >to embed a Layout into another Layout? >
I'm kind of particular about enforcing that start and end tags are matched. I like the concept of embedding some HTML/XML/SGML within another balanced HTML/XML/SGML document rather than including a begginning stub in one place and and ending stub later. I admit it's not that essential, but I just prefer that style of doing things. Has anyone here worked with the Dynamo implementation of JHTML? I'm used to using OPARAMs, so I guess I'm biased. But even more importantly, what I'm conceptually proposing is a way for subdirectories of templates with layouts nested within them. So screen /subdir/foo.vm would use the Layout /subdir/default.vm nested within the /default.vm layout template, and so on. Then you can easily add stuff like "tabs" within a generic site wide "top-and-left" style navigation system. >This idea has been thrown around before by Rafal Krzewski: >------------------ >Some time ago, an idea crossed my mind, that we might want to introduce >another layer of templating, namely Page template. It would contain >the common elements of all Layout templates used in conjuncion with >VelocityOnlyLayout class. An application will use precisely one >Page template, the same way as it uses single Page class now. >This would bring us back to the separation between head and body parts >of the page we had with ECS, but with template driven customization >of head elements available to the developer. >------------------ I do like that idea too for the sake of a general purpose solution. It makes sense to me that the Page would be responsible for the "busy-work" of the HEAD and BODY elements. However wouldn't that make it more difficult for different template types to serve out different types of content? >> On a related note, I think it would make sense for "navigations" to >> be available within the screens. This would make it much easier to >> create widget-like templates with smart functionality that can be >> reused throughout the site. It would be akin to portlets in a sense. > >Sounds like a good idea... we've been using the #parse Velocity >directive for this, preceded by a bunch of #set directives to set up >the context for the template to be parsed. Yeah, we have too, but using a navigation adds the ability to do some pre-requisite actions in Java or Python that you can't easily do in Velocity. A pull tool is great, but sometimes you just need to do some work before the template is rendered that isn't easily done with a Pull tool. I've been batting around ideas for improving the NavigationTool so that you could also pass parameters to the template and have them appear in the context of the template only. I actually have some work that I need to do right now that may call for this, so I'll be experimenting. - Chris __________________________________________________________________ The NEW Netscape 7.0 browser is now available. Upgrade now! http://channels.netscape.com/ns/browsers/download.jsp Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/ -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
