mirror of
https://github.com/smarty-php/smarty.git
synced 2025-11-02 21:31:48 +01:00
sync with en (thanks to mattes)
This commit is contained in:
@@ -1,11 +1,67 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision$ -->
|
||||
<!-- EN-Revision: 1.1 Maintainer: andreas Status: ready -->
|
||||
<sect1 id="variable.config.overwrite">
|
||||
<title>$config_overwrite</title>
|
||||
<para>
|
||||
Definiert ob Variablen in einer Konfiguration sich gegenseitig überschreiben können. Wenn false, werden die Variablen dem Array angehängt. Dies kann hilfreich sein, um Arrays in Konfigurationsdateien abzulegen. Standardwert: true
|
||||
<!-- EN-Revision: 1.4 Maintainer: andreas Status: ready -->
|
||||
<sect1 id="variable.config.overwrite">
|
||||
<title>$config_overwrite</title>
|
||||
<para>
|
||||
<!-- 'Variable' sollte eigentlich besser 'Wert' heissen -->
|
||||
Definiert ob gleichnamige Variablen, die aus
|
||||
<link linkend="config.files">Konfigurationsdateien</link>
|
||||
gelesen werden, sich gegenseitig überschreiben.
|
||||
Der Standardwert für $config_overwrite ist true.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Wenn $config_overwrite auf false gesetzt wird,
|
||||
dann wird aus gleichnamigen Variablen ein Array erstellt.
|
||||
Um folglich ein Array in Konfigurationsdateien ablegen zu können
|
||||
brauchen Sie das entsprechende Element einfach nur mehrfach aufzuführen.
|
||||
</para>
|
||||
|
||||
<example>
|
||||
<title>Array von Konfigurationswerten</title>
|
||||
<para>
|
||||
Dieses Beispiel verwendet
|
||||
<link linkend="language.function.cycle">{cycle}</link>
|
||||
um eine Tabelle abwechselnd mit roten, grünen und blauen
|
||||
Zeilen auszugeben.
|
||||
$config_overwrite ist auf false gesetzt um aus den
|
||||
Farbangaben ein Array zu erzeugen.
|
||||
</para>
|
||||
<para>Die Konfigurationsdatei.</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
# row colors
|
||||
rowColors = #FF0000
|
||||
rowColors = #00FF00
|
||||
rowColors = #0000FF
|
||||
]]>
|
||||
</programlisting>
|
||||
<para>
|
||||
Das Template mit einer
|
||||
<link linkend="language.function.section">{section}</link> Schleife.
|
||||
</para>
|
||||
<programlisting>
|
||||
<![CDATA[
|
||||
<table>
|
||||
{section name=r loop=$rows}
|
||||
<tr bgcolor="{cycle values=#rowColors#}">
|
||||
<td> ....etc.... </td>
|
||||
</tr>
|
||||
{/section}
|
||||
</table>
|
||||
]]>
|
||||
</programlisting>
|
||||
</example>
|
||||
<para>
|
||||
Siehe auch
|
||||
<link linkend="config.files">Konfigurationsdateien</link>,
|
||||
<link linkend="api.get.config.vars">get_config_vars()</link>,
|
||||
<link linkend="api.clear.config">clear_config()</link>
|
||||
<link linkend="api.config.load">config_load()</link>
|
||||
und
|
||||
<link linkend="language.function.config.load">{config_load}</link>.
|
||||
</para>
|
||||
</sect1>
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
||||
Reference in New Issue
Block a user