{* do this somewhere at the top of your template *}详情搜索smarty手册中
{assign var="title" value=$title|default:"no title"}
{* if $title was empty, it now contains the value "no title" when you print it *}
{$title}
Default Variable Handling
{* do this somewhere at the top of your template *}详情搜索smarty手册中
{assign var="title" value=$title|default:"no title"}
{* if $title was empty, it now contains the value "no title" when you print it *}
{$title}