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



默认为true,设置为true时, 配置文件 内的变量将覆盖每个相同名称的变量值。 当false时,相同名称的变量将合并成一个数组。 这在你希望把配置文件内变量变成数组来循环使用的时候非常有用。

Example 13.2. #变量#数组

以下例子是,当$config_overwrite为false时, 使用{cycle} 来显示一个在每列上交替红/绿/蓝三种颜色的表格。


# 行列的颜色
rowColors = #FF0000
rowColors = #00FF00
rowColors = #0000FF



  {section name=r loop=$rows}
  <tr bgcolor="{cycle values=#rowColors#}">
    <td> ....etc.... </td>


参见 {config_load}, getConfigVars(), clearConfig(), configLoad()配置文件

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 9 plus 8? (Are you human?)