Hi,

thanks for the answers.

I'll avoid to put $Id in the context as long as I can though, simply because
it's a very common variable name and it could produce unexpected problem in
the future ;)

For now, Velocity doesn't seem to produce any error message when escaping
only the first $ from the SVN Id keyword string. 
Or maybe I've done something wrong with my Velocity logging since I don't
get any error at all...
Nevertheless it works, so I'll leave it for now.

cheers
-nodje



apache-10 wrote:
> 
> Hi,
> 
> the simplest solution in your case is to place a variable $id into the
> context, possibly the same with the other SVN tags. Example:
>     context.put("id", "$id");
> or Toolbox XML:
>        <data key="id">$id</data>
> 
> Hope this helps...
> :) Christoph
> 
> nodje wrote:
>> I'm using Velocity to render HTML pages.
>> I have a SVN $Id$ keyword in each Velocity template.
>> I'd like to have this one render into the HTML result, so that I can see
>> which file version I'm looking at in a browser. Something like <!-- $Id
>> ..... $ -->
>> 
>> However, if I put it like this in the Velocity template, $Id will be
>> interpreted as a variable and Velocity will report an error. 
>> Usage of Velocity comments works of course, but are not rendered in the
>> resulting page.
>> 
>> So is there any way to tell Velocity not to interpret $id ???'
>> 
>> cheers,
>> --nodje
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/rendering-SVN%27s-%24Id%24-infos-tp15603640p15626388.html
Sent from the Velocity - User mailing list archive at Nabble.com.


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

Reply via email to