Forum OpenACS Q&A: Response to Translation of vars within string

Collapse
Posted by MaineBob OConnor on

Ok, in tclsh I can

% set x 1
1
% set y "you are the $x!"
you are the 1!
% subst {$y}
you are the 1!
% set y
you are the 1!

This works but so does set, but within
my tcl program and using this format:

<p>[subst $y]

No substitution is done...

And I want to avoid David's solution <%=$first_names%> because I want "mere users" to be able to enter a few variables in a text string that gets stored in the db and later select and substitute with the current value of, for instance $name. in the string to render on the page.... (clear?)

-Bob