2004-04-13 08:46:28 +00:00
|
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
|
|
|
|
<!-- $Revision$ -->
|
2005-06-24 07:24:08 +00:00
|
|
|
|
<!-- EN-Revision: 1.9 Maintainer: andreas Status: ready -->
|
2005-06-23 18:56:00 +00:00
|
|
|
|
<sect1 id="language.function.config.load">
|
|
|
|
|
|
<title>config_load (Konfiguration laden)</title>
|
|
|
|
|
|
<informaltable frame="all">
|
|
|
|
|
|
<tgroup cols="5">
|
|
|
|
|
|
<colspec colname="param" align="center" />
|
|
|
|
|
|
<colspec colname="type" align="center" />
|
|
|
|
|
|
<colspec colname="required" align="center" />
|
|
|
|
|
|
<colspec colname="default" align="center" />
|
|
|
|
|
|
<colspec colname="desc" />
|
|
|
|
|
|
<thead>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>Attribut Name</entry>
|
|
|
|
|
|
<entry>Typ</entry>
|
|
|
|
|
|
<entry>Erforderlich</entry>
|
|
|
|
|
|
<entry>Standardwert</entry>
|
|
|
|
|
|
<entry>Beschreibung</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>file</entry>
|
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
|
<entry>Ja</entry>
|
|
|
|
|
|
<entry><emphasis>n/a</emphasis></entry>
|
|
|
|
|
|
<entry>Definiert den Namen der einzubindenden Datei.</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>section</entry>
|
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
|
<entry>Nein</entry>
|
|
|
|
|
|
<entry><emphasis>n/a</emphasis></entry>
|
|
|
|
|
|
<entry>Definiert den Namen des zu ladenden Abschnitts.</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>scope</entry>
|
|
|
|
|
|
<entry>string</entry>
|
|
|
|
|
|
<entry>Nein</entry>
|
|
|
|
|
|
<entry><emphasis>local</emphasis></entry>
|
|
|
|
|
|
<entry>
|
|
|
|
|
|
Definiert den Geltungsbereich der zu ladenden Variablen.
|
|
|
|
|
|
Erlaubte Werte sind 'local','parent' und 'global'. 'local'
|
|
|
|
|
|
bedeutet, dass die Variablen in den Context des lokalen Template
|
|
|
|
|
|
geladen werden. 'parent' bedeutet, dass die Variablen sowohl in
|
|
|
|
|
|
den lokalen Context, als auch in den Context des aufrufenden
|
|
|
|
|
|
Templates eingebunden werden. 'global' bedeutet, dass die
|
|
|
|
|
|
Variablen von allen Templates zug<75>nglich sind.
|
|
|
|
|
|
</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
<row>
|
|
|
|
|
|
<entry>global</entry>
|
|
|
|
|
|
<entry>boolean</entry>
|
|
|
|
|
|
<entry>Nein</entry>
|
|
|
|
|
|
<entry><emphasis>No</emphasis></entry>
|
|
|
|
|
|
<entry>
|
|
|
|
|
|
Definiert, ob die Variablen von allen Templates aus zug<75>nglich
|
|
|
|
|
|
sind. WICHTIG: Dieses Attribut wird von 'scope' abgel<65>st und
|
|
|
|
|
|
sollte nicht mehr verwendet werden. Falls 'scope' <20>bergeben
|
|
|
|
|
|
wurde, wird 'global' ignoriert.
|
|
|
|
|
|
</entry>
|
|
|
|
|
|
</row>
|
|
|
|
|
|
</tbody>
|
|
|
|
|
|
</tgroup>
|
|
|
|
|
|
</informaltable>
|
|
|
|
|
|
<para>
|
|
|
|
|
|
Diese Funktion wird verwendet, um <link
|
|
|
|
|
|
linkend="language.config.variables">Variablen aus einer
|
|
|
|
|
|
Konfigurationsdatei</link> in das Template zu laden. Sehen sie
|
|
|
|
|
|
<link linkend="config.files">Config Files
|
|
|
|
|
|
(Konfigurationsdateien)</link> f<>r weitere Informationen.
|
|
|
|
|
|
</para>
|
|
|
|
|
|
<example>
|
|
|
|
|
|
<title>Funktion config_load</title>
|
|
|
|
|
|
<para>
|
|
|
|
|
|
beispiel.conf
|
|
|
|
|
|
</para>
|
|
|
|
|
|
<programlisting>
|
|
|
|
|
|
<![CDATA[
|
|
|
|
|
|
#Dies ist ein Konfigurationsdateikommentar
|
|
|
|
|
|
|
|
|
|
|
|
# globale Variablen
|
|
|
|
|
|
seitenTitel = "Hauptmen<65>"
|
|
|
|
|
|
bodyHintergrundFarbe = #000000
|
|
|
|
|
|
tabelleHintergrundFarbe = #000000
|
|
|
|
|
|
reiheHintergrundFarbe = #00ff00
|
2004-04-13 08:46:28 +00:00
|
|
|
|
|
2005-06-23 18:56:00 +00:00
|
|
|
|
# Kundenvariablen
|
|
|
|
|
|
[Kunden]
|
|
|
|
|
|
seitenTitel = "Kundeninfo"
|
|
|
|
|
|
]]>
|
|
|
|
|
|
</programlisting>
|
|
|
|
|
|
<para>and the template</para>
|
|
|
|
|
|
<programlisting>
|
2004-07-16 14:32:31 +00:00
|
|
|
|
<![CDATA[
|
2005-06-23 18:56:00 +00:00
|
|
|
|
{config_load file="example.conf"}
|
|
|
|
|
|
|
2004-07-16 14:32:31 +00:00
|
|
|
|
<html>
|
|
|
|
|
|
<title>{#seitenTitel#}</title>
|
|
|
|
|
|
<body bgcolor="{#bodyHintergrundFarbe#}">
|
|
|
|
|
|
<table border="{#tabelleRahmenBreite#}" bgcolor="{#tabelleHintergrundFarbe#}">
|
2005-06-23 18:56:00 +00:00
|
|
|
|
<tr bgcolor="{#reiheHintergrundFarbe#}">
|
|
|
|
|
|
<td>Vornamen</td>
|
|
|
|
|
|
<td>Nachnamen</td>
|
|
|
|
|
|
<td>Adresse</td>
|
|
|
|
|
|
</tr>
|
2004-07-16 14:32:31 +00:00
|
|
|
|
</table>
|
|
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|
|
|
|
|
|
]]>
|
2005-06-23 18:56:00 +00:00
|
|
|
|
</programlisting>
|
|
|
|
|
|
</example>
|
|
|
|
|
|
<para>
|
|
|
|
|
|
<link linkend="config.files">Konfigurationsdateien</link> k<>nnen
|
|
|
|
|
|
Abschnitte enthalten. Um Variablen aus einem Abschnitt zu laden,
|
|
|
|
|
|
k<>nnen Sie das Attribut <emphasis>section</emphasis> <20>bergeben.
|
|
|
|
|
|
</para>
|
|
|
|
|
|
<para>
|
|
|
|
|
|
Bemerkung: <emphasis>Konfigurationdatei-Abschnitte
|
|
|
|
|
|
(sections)</emphasis> und die eingebaute Template Funktion namens
|
|
|
|
|
|
<link linkend="language.function.section">section</link> haben ausser
|
|
|
|
|
|
dem Namen nichts gemeinsam.
|
|
|
|
|
|
</para>
|
|
|
|
|
|
|
|
|
|
|
|
<example>
|
|
|
|
|
|
<title>Funktion config_load mit Abschnitten</title>
|
|
|
|
|
|
<programlisting>
|
2004-07-16 14:32:31 +00:00
|
|
|
|
<![CDATA[
|
2005-06-23 18:56:00 +00:00
|
|
|
|
{config_load file="beispiel.conf" section="Kunde"}
|
2004-07-16 14:32:31 +00:00
|
|
|
|
<html>
|
|
|
|
|
|
<title>{#seitenTitel#}</title>
|
|
|
|
|
|
<body bgcolor="{#bodyHintergrundFarbe#}">
|
|
|
|
|
|
<table border="{#tabelleRahmenBreite#}" bgcolor="{#tabelleHintergrundFarbe#}">
|
2005-06-23 18:56:00 +00:00
|
|
|
|
<tr bgcolor="{#reiheHintergrundFarbe#}">
|
|
|
|
|
|
<td>Vornamen</td>
|
|
|
|
|
|
<td>Nachnamen</td>
|
|
|
|
|
|
<td>Adresse</td>
|
|
|
|
|
|
</tr>
|
2004-07-16 14:32:31 +00:00
|
|
|
|
</table>
|
|
|
|
|
|
</body>
|
|
|
|
|
|
</html>
|
|
|
|
|
|
]]>
|
2005-06-23 18:56:00 +00:00
|
|
|
|
</programlisting>
|
|
|
|
|
|
</example>
|
|
|
|
|
|
|
|
|
|
|
|
<para>
|
|
|
|
|
|
Siehe auch <link
|
|
|
|
|
|
linkend="config.files">Konfigurationsdateien</link>, <link
|
|
|
|
|
|
linkend="language.config.variables">Variablen aus
|
|
|
|
|
|
Konfigurationsdateien</link>, <link
|
|
|
|
|
|
linkend="variable.config.dir">$config_dir</link>, <link
|
|
|
|
|
|
linkend="api.get.config.vars">get_config_vars()</link> und <link
|
|
|
|
|
|
linkend="api.config.load">config_load()</link>.
|
|
|
|
|
|
</para>
|
2004-04-13 08:46:28 +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
|
2004-07-16 14:32:31 +00:00
|
|
|
|
-->
|