on 11/23/2000 10:25 AM, "Herv� Guidetti" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm a newbie with Velocity.
> I'd like to have a template calling other templates. For example, the basic
> templates is something like that :
> --------------------------------------
> MyTage.vm :
> <p>
> $include_title
> <br>
> $include_text
> ------------------------------------
>
> And two other templates :
>
> --------------------------------
> Title.vm :
> <font color="red" size="16">Title : $theTitle</font>
> -------------------------------
> Text.vm
> <font color="blue" size="10">Here is the text : $text</font>
> --------------------------------
>
> I'd like to have Text.java and Title.java exporting their own context.
>
> Is it possible to do that ? If yes, how ??
You should use the recently added #macro directive to do what you want. See
the archives of the velocity mailing list for more information. You will
probably also need to build yourself a new version of the velocity.jar file.
You can add the #macro's to your layout or even page and they will then be
available to all of your screens.
-jon
--
twice of not very much is still a lot more than not very much
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]