You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Matthew Pomar <ma...@hotmail.com> on 2003/09/10 20:24:55 UTC

Struts Tiles and Velocity... Oh My!

I've used Struts Tiles quite a bit and am pretty new to Turbine. I really
like Velocity and prefer it over JSP any day, but I can't seam to get a
handle on the Turbine Velocity Template engine. I'm sure it would be easier
if I didn't use Tiles first.

One of the things that was very easy in Tiles is to replace a tile at
runtime, something I'm struggling with using Turbine's Template engine. For
example let's say I had a layout template in Tiles, and in that template was
a placeholder for another Tile that represents Tabs that go across the top
of my page. At runtime, I could replace the one set of tabs with a different
set (depending on what tab I want to be selected). What is even nicer with
Tiles is I could create named templates like "HomeTemplate" or
"ContactTemplate" which extended "BaseTemplate" that overrode the Tabs
placeholder. This can even be done declaratively in an XML file.

The Navigation template's in Turbine confuse me, because there doesn't seem
to be a way to replace them at runtime, such as I did in Tiles for my page's
tabs. I think the differentiating factor is that Tiles allowed for
inheritance and Turbine Templates seemingly do not.

Could someone with knowledge of Tiles and Turbine tell me what they
understand the difference is, or how can accomplish what I want (which is to
switch Tabs at runtime)?

Thanks,
 - Matt