Updated CodeCorner3 (markdown)

leithoff 2016-07-22 12:15:27 +02:00
parent 5ecd7f5d3c
commit 3753bbc207

@ -117,23 +117,6 @@ Assume that we wanted to name our first eTemplate <em>index</em>.<br />
<dd>put in the basic template stuff that is needed to build our template
<pre>
&lt;template id="test.index" template="" lang="" group="0" version="1.9.101"&gt;
&lt;groupbox id="debuginfo"&gt;
&lt;caption label="Debuginfo"/&gt;
&lt;grid&gt;
&lt;columns&gt;
&lt;column/&gt;
&lt;/columns&gt;
&lt;rows&gt;
&lt;row&gt;
&lt;textbox multiline="true" id="message" no_lang="1" readonly="true"/&gt;
&lt;/row&gt;
&lt;row&gt;
&lt;textbox lable="record-id" id="test_id" no_lang="1" readonly="true"/&gt;
&lt;/row&gt;
&lt;/rows&gt;
&lt;/grid&gt;
&lt;/groupbox&gt;
&lt;hrule/&gt;
&lt;grid&gt;
&lt;columns&gt;
&lt;column/&gt;
@ -243,7 +226,7 @@ those are buttons in a row (of a grid)
</pre>
</li>
<li>Save</li>
<li>now clear cache and cookies of your browser, call <em>Clear cache and register hooks</em> in admin . :
<li>now clear cache and cookies of your browser, call <em>Clear cache and register hooks</em> in admin
</li>
<li>you should see your new template</li>
</ul>
@ -256,14 +239,62 @@ those are buttons in a row (of a grid)
<dd>
<dl>
<dt>Step 7</dt>
<dd>Now our first eTemplate is designed.</dd>
<dd>Now our first eTemplate is designed.
<pre>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE overlay PUBLIC "-//Stylite AG//eTemplate 2//EN" "http://www.egroupware.org/etemplate2.dtd"&gt;
&lt;!-- $Id$ --&gt;
&lt;overlay&gt;
&lt;template id="test.index" template="" lang="" group="0" version="1.9.101"&gt;
&lt;groupbox id="debuginfo"&gt;
&lt;caption label="Debuginfo"/&gt;
&lt;grid&gt;
&lt;columns&gt;
&lt;column/&gt;
&lt;/columns&gt;
&lt;rows&gt;
&lt;row&gt;
&lt;textbox multiline="true" id="message" no_lang="1" readonly="true"/&gt;
&lt;/row&gt;
&lt;row&gt;
&lt;textbox lable="record-id" id="test_id" no_lang="1" readonly="true"/&gt;
&lt;/row&gt;
&lt;/rows&gt;
&lt;/grid&gt;
&lt;/groupbox&gt;
&lt;hrule/&gt;
&lt;grid&gt;
&lt;columns&gt;
&lt;column/&gt;
&lt;column/&gt;
&lt;/columns&gt;
&lt;rows&gt;
&lt;row&gt;
&lt;description font_style="20" href="40" value="firstname" no_lang="1"/&gt;
&lt;textbox blur="Type in a name" id="test_firstname" no_lang="1" size="25" maxlength="40"/&gt;
&lt;/row&gt;
&lt;row&gt;
&lt;description value="name"/&gt;
&lt;textbox id="test_name" size="25" maxlength="40"/&gt;
&lt;/row&gt;
&lt;row&gt;
&lt;button label="new " id="new"/&gt;
&lt;button align="right" label="submit" id="submit"/&gt;
&lt;/row&gt;
&lt;/rows&gt;
&lt;/grid&gt;
&lt;/template&gt;
&lt;/overlay&gt;
</pre>
</dd>
</dl>
<dl>
<dd>
<ul>
<li>we have a input-field to enter text</li>
<li>we have a submit button to send our form somewhere (by default back to our very page).</li>
<li>we have some input-fields to enter text</li>
<li>we have a submit button to send our form somewhere (by default back to our very page).</li>
<li>we have a container to hold our response</li>
</ul>
</dd>
@ -281,7 +312,7 @@ security issues, callbacks (e.g. for required field values, etc.
</dd>
</dl>
Doing all that, all you have to do, is handling the data.<br />
The data are transported within the $content[...] array. Each name you assign within a eTemplate will respond to named entrys in the $content[...] array. Our name will be accessible via <tt>$content['name']</tt> and "<em>who</em>" the field which was intended to hold and display the value of the submitted name via <tt>$content['who']</tt>.<br />
The data are transported within the $content[...] array. Each name you assign within a eTemplate will respond to named entrys in the $content[...] array. Our name will be accessible via <tt>$content['name']</tt> <br />
While you control the content of the <tt>$content[...]</tt> array, you control the behavior of your eTemplate.<br />
&nbsp;
<dl>