Functions:default

From Dwoo Docs

Jump to: navigation, search

Returns a variable or a default value if it's empty

default(mixed $value, [ mixed $default = ""])
  • value : the variable to check
  • default : fallback value if the first one is empty




Example:

{$var1="foo"}
{$var2=""}
{default $var1 "bar"}
{default $var2 "bar"}
{default $var3 "bar"}

Output:

foo
bar
bar
Personal tools
templates
page language

French

The article you want to access doesn't exist in French.
Deutsch
The article you want to access doesn't exist in Deutsch.
Russian
The article you want to access doesn't exist in Russian.