Get Smarty


Smarty Icon

You may use the Smarty logo according to the trademark notice.

Smarty Template Engine Smarty Template Engine

For sponsorship, advertising, news or other inquiries, contact us at:

Sites Using Smarty

Buy cheap glasses from and save up to 80%.

Where to buy prescription glasses? is your best choice!

Where to buy discount wedding dresses and cheap smart dresses free shipping -

Shop for 2018 World Cup Football Boots Online sale at

Browse best 2018 world cup soccer cleats and shoes from




语法: {setfilter filter1|filter2|filter3....}...{/setfilter}


  • 变量过滤插件的名称。

  • 修饰器的名称和可选的参数。

{setfilter}...{/setfilter}可以被嵌套。 内部的过滤器块会被外部的过滤器块给替代。

模板过滤器可以和其他过滤器修饰器一起使用。 它们会按照如下顺序执行: 修饰器, 默认修饰器, $escape_html, 注册的变量过滤器, 自动载入的变量过滤器, 模板块变量过滤器。 所有在“默认修饰器”之后的东西,都可以被nofilter关闭。

Example 7.77. {setfilter} 标签

{setfilter filter1}
  {$foo} {* filter1 runs on output of $foo *}
  {setfilter filter2|mod:true}
    {$bar} {* filter2 and modifier mod runs on output of $bar *}
  {$buh} {* filter1 runs on output of $buh *}
{$blar} {* no template instance filter runs on output of $blar}




No comments for this page.
Post a Comment
All comments are moderated. Support questions are ignored, use the forums instead.
Email: (not shown)
What is 4 plus 8? (Are you human?)