\$config_overwrite {#variable.config.overwrite}
如果将其设为 TRUE,则从 配置文件 中读取的默认 then 变量将互相覆盖。否则,变量将压入数组。如果你希望在配置文件中存储数据数组,这非常有用,只需要将每个元素列出多次即可。
本示例使用 {cycle}
输出带有交替红色/绿色/蓝色行颜色的表格,其中 $config_overwrite
= FALSE。
配置文件。
# row colors
rowColors = #FF0000
rowColors = #00FF00
rowColors = #0000FF
带有 {section}
循环的模板。
<table>
{section name=r loop=$rows}
<tr bgcolor="{cycle values=#rowColors#}">
<td> ....etc.... </td>
</tr>
{/section}
</table>
另请参见 {config_load}
、getConfigVars()
、clearConfig()
、configLoad()
以及 配置文件部分。