You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Day, Michael-IBM/TT" <Mi...@Nextel.com> on 2002/09/03 21:20:24 UTC

[Velocity Tools] - Struts

I am attempting to use velocity tools 0.9 with struts 1.1-b2 and velocity
1.3.  Does anyone know how I could use a VM template for layout purposes,
instead of doing #include for headers/footers/menus on each content page?
For example, the login page may have a layout different from a product
display page.  I'd like to define this separate from the content.

__________________________________________________
Michael Blake Day
Nextel Communications, Inc.
email: michael.day@nextel.com
desk: 678.966.4792 

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Velocity Tools] - Struts

Posted by Nathan Bubna <na...@esha.com>.
Michael said:
> I am attempting to use velocity tools 0.9 with struts 1.1-b2 and velocity
> 1.3.  Does anyone know how I could use a VM template for layout purposes,
> instead of doing #include for headers/footers/menus on each content page?
> For example, the login page may have a layout different from a product
> display page.  I'd like to define this separate from the content.

Search the mail archives for discussion on this matter of a layout/"super"
template.  This has been discussed before.  Also, at one point I posted a
VelocityLayoutServlet for this very purpose that was intended to be placed
in the contrib section.  I'm not sure though whether it ever made it in
there.

Nathan Bubna
nathan@esha.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [Velocity Tools] - Struts

Posted by Gabriel Sidler <si...@teamup.com>.
Day, Michael-IBM/TT wrote:

> I am attempting to use velocity tools 0.9 with struts 1.1-b2 and velocity
> 1.3.  Does anyone know how I could use a VM template for layout purposes,
> instead of doing #include for headers/footers/menus on each content page?
> For example, the login page may have a layout different from a product
> display page.  I'd like to define this separate from the content.
> 


In the Struts/JSP world there is Tiles. Tiles is a JSP Taglib and could be
described as a templating system or document assembler. You might be
able to get some ideas from it for use in Velocity. It seems quite
popular and successful within the Struts community.
http://jakarta.apache.org/struts/userGuide/dev_tiles.html

I also liked the article "UI design with Tiles and Struts" at
http://www.javaworld.com/javaworld/jw-01-2002/jw-0104-tilestrut.html
It's JSP-focused and therefore not directly applicable to Velocity,
but it nicely present the various concepts to eliminate redudancy
in web pages by using templates.

It would be really great to have something like Tiles for Velocity.
That would be a cool contribution...


Gabe


-- 
--
Gabriel Sidler
Software Engineer, Eivycom GmbH, Zurich, Switzerland


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>