velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Geir Magnusson Jr <g...@4quarters.com>
Subject Re: macro names from variables?
Date Thu, 19 Aug 2004 20:30:00 GMT

On Aug 13, 2004, at 1:49 PM, Robert Brandner wrote:

> Hello!
>
> Is it possible do get the name of a macro to call from a variable?
>
> something like:
>
> #set($macroname = 'foo')
>
> #$macroname($parameters)   ## <-- something like that, to call the 
> macro
>
> #macro(foo $parameters)
>     ##
>     ## something wonderful is to happen here.
>     ##
> #end
>
> I tries with double quotes but had no success.
>
> Any ideas? Is it possible at all?

The only way is with an evaluation tool, that takes a string arg and 
treats it like a template.

There should be something in velocity tools.

geir

>
> Best regards
> Robert
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>
-- 
Geir Magnusson Jr                                   203-247-1713(m)
geir@4quarters.com


-- 
Geir Magnusson Jr                                   203-247-1713(m)
geir@4quarters.com 
                                  


---------------------------------------------------------------------
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