There may be times when you want to print a default value for an empty variable instead of printing nothing, such as printing " " so that table backgrounds work properly. Many would use an {if} statement to handle this, but there is a shorthand way with Smarty, using the default variable modifier.
也许有时候你想给一个没有赋值的变量输出一个默认的值来代替什么也不输出,比如输出' '[这是一个空格符号,HTML里的标记]来使得表格里的背景能够正常工作。大多数人使用{if}语句来处理这些,但是用Smatry这里有一个捷径,那就是使用 default [默认的]值赋给变量。