You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by "Dickinson, Ian J" <Ia...@hp.com> on 2004/04/16 01:57:00 UTC
Run-time parameterisation of Anakia tasks
Hi,
I'm new to this list, so apologies in advance if this is a FAQ. I did search
the archive already, but didn't see an answer to this.
I have an Anakia task that I want to parameterise at Ant run time.
Depending on the target, I invoke the Anakia task with a particular Ant
property set to one of two values, and depending on the value I want to
generate a different line of HTML output from the template. I know I could
use two different templates, but that seems ugly. Can I have a VTL #if
directive test the value of an Ant property? If not, is there a more
elegant way I can customise my template's behaviour from an Ant script?
Thanks in advance,
Ian
_____________________________________________________________________
Ian Dickinson HP Labs, Bristol, UK mailto:ian.dickinson@hp.com
net www.hpl.hp.com/personal/Ian_Dickinson ph +44 (117) 312 8796
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org
Re: Run-time parameterisation of Anakia tasks
Posted by ti...@conduitco.com.
Quoting "Dickinson, Ian J" <Ia...@hp.com>:
> Hi,
> I'm new to this list, so apologies in advance if this is a FAQ. I did search
> the archive already, but didn't see an answer to this.
>
> I have an Anakia task that I want to parameterise at Ant run time.
> Depending on the target, I invoke the Anakia task with a particular Ant
> property set to one of two values, and depending on the value I want to
> generate a different line of HTML output from the template. I know I could
> use two different templates, but that seems ugly. Can I have a VTL #if
> directive test the value of an Ant property? If not, is there a more
> elegant way I can customise my template's behaviour from an Ant script?
>
> Thanks in advance,
> Ian
>
> _____________________________________________________________________
> Ian Dickinson HP Labs, Bristol, UK mailto:ian.dickinson@hp.com
> net www.hpl.hp.com/personal/Ian_Dickinson ph +44 (117) 312 8796
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
--
"If you can't laugh yourself, you're not taking life seriously enough."
-- Larry Wall
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org