Hi,

I think you need to extend VelocityScreen, as specified on
http://jakarta.apache.org/turbine/turbine/turbine-2.3.2/howto/velocity-site-
howto.html

---------
public class HelloWorld extends VelocityScreen
{
    public void doBuildTemplate( RunData data, Context context )
        throws Exception
    {
        // the context object has already been setup for you!
        context.put ("hello", "this is a test...");
    }
}
---------

This would be in src/java/org/apache/turbine/app/turbine_menus/screens

Good luck,

David

-----Original Message-----
From: Angel Garcia [mailto:[EMAIL PROTECTED] 
Sent: May 29, 2006 2:23 PM
To: [email protected]
Subject: using variable content in velocity only layout

Hi,

I have a question about put some dynamic code in the velocity only layout.

I create a java class and I wanna use in the Default.vm layout (that
is, use the class in the velocity context of the layout).

I try with

public class Default extends VelocityOnlyLayout
{
    public void doBuild (RunData data) throws Exception
    {
        Context context = TurbineVelocity.getContext(data);
        
        Myclass mid = new Myclass (6, 7);

        context.put ("mid", midi);

        super.doBuild (data);
    }
}
in src/java/org/apache/turbine/app/turbine_menus/modules/layouts

and use the variable $mid in Defalult.vm, but this don't work


Is there any solution?

tanks for your help

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to