Author Topic: Have you any plan to support "default"?  (Read 1834 times)

0 Members and 1 Guest are viewing this topic.

jacobswell

  • Guest
Have you any plan to support "default"?
on: Sat, 28. February 2004 - 07:12:36
Hello.
It seems vlibTemplate is based on Perl's HTML::Template. and Perl's Template supports default, but I think vlib does not. Have you any plan to support it or not? :wink:

thanks.

releasedj

  • Guest
Have you any plan to support "default"?
Reply #1 on: Tue, 02. March 2004 - 11:07:04
Please be more specific. I have no idea what you're talking about from this post!

Jeroen van der Tuin

  • Guest
Have you any plan to support "default"?
Reply #2 on: Thu, 16. June 2005 - 14:29:03
I think by default is meant:

<tmpl_var name="varName" default="Default value" />

Am I right?

Offline ClausVB

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
    • Homepage: clausvb.de
Have you any plan to support "default"?
Reply #3 on: Sat, 18. June 2005 - 13:47:26
Quote
<tmpl_var name="varName" default="Default value" />
Perhaps your right. But this is possible with vLIB 4.0.x:

<tmpl_if name=varName>specific value<tmpl_else>default value</tmpl_if>

or

<tmpl_if name=var_name op=<> value=>{tmpl_var name="var_name"}<tmpl_else>default value</tmpl_if>

Should work, I think.

Regards,
Claus
Last Edit: Sat, 18. June 2005 - 13:47:42 by ClausVB