当一个��在模�内�常使用,而�次使用都需�给它设置default修饰器时,这将会�常�优雅。
ä½ å�¯ä»¥ç”¨{assign}函数æ�¥ç»™å�˜é‡�赋一个默认值。
Example 21.2. 给��赋默认值
{* do this somewhere at the top of your template *}
{assign var='title' value=$title|default:'no title'}
{* if $title was empty, it now contains the value "no title" when you use it *}
{$title}
��
default修饰器和空��的处�.
