On Tue, Dec 10, 2002 at 03:51:01PM -0600, Kapoor, Nishikant X wrote:
>I would like to have the output substitute only the first var 'title' and not the
>second one. The output I am expecting to see is:
>Title: The Titanic
>Ref: <tmpl_var name=ref>
I've done something similar, where I wanted to use H::T to generate a
page which would then be used as a template later on. The trick is: use
two separate codes. I used <tmpl_*> for the stuff to be substituted on
the first pass, as normal, and <2mpl_*> for the stuff to be substituted
on the second. So your example would have:
Title: <tmpl_var name=title>
Ref: <2mpl_var name=ref>
H::T will happily ignore the <2mpl_*> codes.
Then load the template as normal, and instead of
print FILE $tmpl->output;
write instead
{
my $o=$tmpl->output;
$o =~ s/2mpl/tmpl/ig;
print FILE $o;
}
Roger
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users