[html-template-devel] tmpl_equal needed ?
Igor Plekhov
penguin at ocean.vvo.ru
Tue Dec 26 00:39:35 UTC 2006
On Tue, 26 Dec, 2006 at 03:50:03 +0530, Vamsee Kanakala wrote:
>
> I think html-template really needs a templ_equal tag. I am trying to
> pre-select an option inside a select tag, based on parameters passed.
> Since the option tags are also being generated through a loop, I think
> there is no way I can do this unless I can have some comparison
> mechanism within the template. Kindly correct me if I'm wrong.
You can use parameters passed while generating data to fill
the template. And set some variable to T at some particular loop
step. That variable will be NIL at all other steps.
Then in the template use <tmpl_if> to emit "selected" inside
<option>s.
In this way your template and data are still completely separate.
It is GOOD THING. But with any kind of <tmpl_equal> they will not.
--
Registered Linux User #124759
More information about the Html-template-devel
mailing list