Philip S Tellis wrote:

> <tmpl_if comment>
> template comment
> </tmpl_if>
> 
> $template->param(comment => 0);
> 
> Works perfectly.
 
Yes, and depending on other settings

        $template->param(comment => 0);

might not even be neccessary, as long as comment stays undefined.

> alternately:
> 
> <tmpl_comment>
> ...
> </tmpl_comment>
> 
> sub comment_filter {
>         ...
>         s#<(/?)tmpl_comment>#"<$1tmpl_if".$1?"":" comment">#eg;
>         ...
> }
> 
> of course, you could make the expression faster and easier to read if
> you made it two s/// statements instead.

That one is nice as well, although I prefer not having to do any special
filtering.

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

Reply via email to