PHP Classes

File: htdocs/xoops_lib/vendor/smarty/smarty/docs/programmers/api-variables/variable-config-overwrite.md

Recommend this page to a friend!
  Packages of Michael Beck   Xoops 2.5   htdocs/xoops_lib/vendor/smarty/smarty/docs/programmers/api-variables/variable-config-overwrite.md   Download  
File: htdocs/xoops_lib/vendor/smarty/smarty/docs/programmers/api-variables/variable-config-overwrite.md
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: Xoops 2.5
Modular content management publication system
Author: By
Last change:
Date: 3 months ago
Size: 1,090 bytes
 

Contents

Class file image Download

\$config\_overwrite {#variable.config.overwrite}

If set to TRUE, the default then variables read in from config files will overwrite each other. Otherwise, the variables will be pushed onto an array. This is helpful if you want to store arrays of data in config files, just list each element multiple times.

This examples uses {cycle} to output a table with alternating red/green/blue row colors with $config_overwrite = FALSE.

The config file.

# row colors
rowColors = #FF0000
rowColors = #00FF00
rowColors = #0000FF

    

The template with a {section} loop.

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

    

See also {config_load}, getConfigVars(), clearConfig(), configLoad() and the config files section.