velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Farquhar <sc...@atlassian.com>
Subject Re: Template inheritance
Date Mon, 19 May 2003 04:31:55 GMT


Nathan Bubna wrote:
> Dirk said:
> Velocity doesn't give you the ability to extend templates in such a
> manner, nor is such a feature planned AFAIK.  since you appear to be
> creating a webapp, i recommend checking out the jakarta-velocity-tools
> project.  it provides a VelocityLayoutServlet that can offer
> functionality somewhat similar to this.  with it you would define one
> (a default) or more "layout" templates analagous to your master
> template, and "body" or "screen content" templates would be able to
> set variables for the layout.  the screen template could also override
> (even dynamically, if you want) the layout to be used if the default
> one is not desired.
> 
> anyway, you can check the project out and build the docs yourself, or
> peruse them online first at
> http://www.happysearch.com/velocity/tools/docs/
> we haven't gotten them up on the main jakarta site yet.

To second alternative approaches for web-apps, can I suggest Sitemesh? 
It does a similar thing to what you are suggesting (decorating of whole 
pages).

   http://www.opensymphony.com/sitemesh/

Whilst not integrated with velocity (yet!), you can achieve your results 
by using the VelocityServlet.

Cheers,
Scott

-- 

ATLASSIAN - http://www.atlassian.com
Expert J2EE Software, Services and Support
-------------------------------------------------------
Need a simple, powerful way to track and manage issues?
Try JIRA - http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message