2004-04-13 11:47:32 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
|
|
<!-- $Revision$ -->
|
2005-06-05 19:46:19 +00:00
|
|
|
<sect1 id="variable.config.overwrite">
|
|
|
|
<title>$config_overwrite</title>
|
|
|
|
<para>
|
2006-09-27 06:28:21 +00:00
|
|
|
If set to &true;, the default then variables read in from
|
2005-06-05 19:46:19 +00:00
|
|
|
<link linkend="config.files">config files</link> 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.
|
|
|
|
</para>
|
|
|
|
|
|
|
|
<example>
|
2006-09-27 06:28:21 +00:00
|
|
|
<title>Array of config #variables#</title>
|
2005-06-05 19:46:19 +00:00
|
|
|
<para>
|
|
|
|
This examples uses
|
2006-09-27 06:28:21 +00:00
|
|
|
<link linkend="language.function.cycle"><varname>{cycle}</varname></link>
|
|
|
|
to output a table with alternating red/green/blue row colors
|
|
|
|
with <parameter>$config_overwrite</parameter> = &false;.
|
2005-06-05 19:46:19 +00:00
|
|
|
</para>
|
|
|
|
<para>The config file.</para>
|
|
|
|
<programlisting>
|
|
|
|
<![CDATA[
|
|
|
|
# row colors
|
|
|
|
rowColors = #FF0000
|
|
|
|
rowColors = #00FF00
|
|
|
|
rowColors = #0000FF
|
|
|
|
]]>
|
|
|
|
</programlisting>
|
|
|
|
<para>
|
2006-09-27 06:28:21 +00:00
|
|
|
The template with a <link linkend="language.function.section">
|
|
|
|
<varname>{section}</varname></link> loop.
|
2004-04-13 11:47:32 +00:00
|
|
|
</para>
|
2005-06-05 19:46:19 +00:00
|
|
|
<programlisting>
|
|
|
|
<![CDATA[
|
|
|
|
<table>
|
|
|
|
{section name=r loop=$rows}
|
|
|
|
<tr bgcolor="{cycle values=#rowColors#}">
|
|
|
|
<td> ....etc.... </td>
|
|
|
|
</tr>
|
|
|
|
{/section}
|
|
|
|
</table>
|
|
|
|
]]>
|
|
|
|
</programlisting>
|
|
|
|
</example>
|
|
|
|
<para>
|
|
|
|
See also
|
2006-09-27 06:28:21 +00:00
|
|
|
<link linkend="language.function.config.load"><varname>{config_load}</varname></link>,
|
|
|
|
<link linkend="api.get.config.vars"><varname>get_config_vars()</varname></link>,
|
|
|
|
<link linkend="api.clear.config"><varname>clear_config()</varname></link>,
|
|
|
|
<link linkend="api.config.load"><varname>config_load()</varname></link>
|
|
|
|
and the <link linkend="config.files">config files section</link>.
|
2005-06-05 19:46:19 +00:00
|
|
|
</para>
|
|
|
|
|
2004-04-13 11:47:32 +00:00
|
|
|
</sect1>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../../../../manual.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
2005-06-06 11:58:08 +00:00
|
|
|
-->
|