From: Nat Pryce Date: 2002-08-29T02:34:17+09:00 Subject: Re: Amrita: simple variable interpolation Use a span element in the text and give the span an ID. E.g.

My dog's name is dog name goes here

The text "dog name goes here" will be replaced in the generated document. Cheers, Nat. On Wed, 2002-08-28 at 16:49, Dan Debertin wrote: > I'm just playing with Amrita today in anticipation of a CGI project > looming in my future. It looks perfect -- no more forcing my data into > weird hashes of arrays of single-element hashes, and other > monstrosities. > > I'm able to apply it to everything described in the docs -- tables, > lists, etc. -- but I don't see a way to perform simple variable > substitution. My understanding is that it requires a preceding tag > with an "id=" attribute, but ordinary text doesn't necessarily have > tags. > > For example, here's what I would do using HTML::Template: > > (template) >

> My dog's name is . > > (elided code) > tmpl.param(:dogname => "grumpy") > > tmpl.output # --> "

\nMy dog's name is grumpy.\n" > > Now, there's no tag in there to apply an id attribute to, so I'm a > little stumped as to how to do this with Amrita. > > What am I missing? -- Dr. Nathaniel Pryce, Technical Director, B13media Ltd. Studio 3a, 22-24 Highbury Grove, London N5 2EA, UK http://www.b13media.com