mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-08-08 07:55:01 +02:00
Updated CodeCorner3 (markdown)
@ -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
|
<dd>put in the basic template stuff that is needed to build our template
|
||||||
<pre>
|
<pre>
|
||||||
<template id="test.index" template="" lang="" group="0" version="1.9.101">
|
<template id="test.index" template="" lang="" group="0" version="1.9.101">
|
||||||
<groupbox id="debuginfo">
|
|
||||||
<caption label="Debuginfo"/>
|
|
||||||
<grid>
|
|
||||||
<columns>
|
|
||||||
<column/>
|
|
||||||
</columns>
|
|
||||||
<rows>
|
|
||||||
<row>
|
|
||||||
<textbox multiline="true" id="message" no_lang="1" readonly="true"/>
|
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<textbox lable="record-id" id="test_id" no_lang="1" readonly="true"/>
|
|
||||||
</row>
|
|
||||||
</rows>
|
|
||||||
</grid>
|
|
||||||
</groupbox>
|
|
||||||
<hrule/>
|
|
||||||
<grid>
|
<grid>
|
||||||
<columns>
|
<columns>
|
||||||
<column/>
|
<column/>
|
||||||
@ -243,7 +226,7 @@ those are buttons in a row (of a grid)
|
|||||||
</pre>
|
</pre>
|
||||||
</li>
|
</li>
|
||||||
<li>Save</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>
|
||||||
<li>you should see your new template</li>
|
<li>you should see your new template</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -256,13 +239,61 @@ those are buttons in a row (of a grid)
|
|||||||
<dd>
|
<dd>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Step 7</dt>
|
<dt>Step 7</dt>
|
||||||
<dd>Now our first eTemplate is designed.</dd>
|
<dd>Now our first eTemplate is designed.
|
||||||
|
<pre>
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE overlay PUBLIC "-//Stylite AG//eTemplate 2//EN" "http://www.egroupware.org/etemplate2.dtd">
|
||||||
|
<!-- $Id$ -->
|
||||||
|
<overlay>
|
||||||
|
<template id="test.index" template="" lang="" group="0" version="1.9.101">
|
||||||
|
<groupbox id="debuginfo">
|
||||||
|
<caption label="Debuginfo"/>
|
||||||
|
<grid>
|
||||||
|
<columns>
|
||||||
|
<column/>
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<textbox multiline="true" id="message" no_lang="1" readonly="true"/>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<textbox lable="record-id" id="test_id" no_lang="1" readonly="true"/>
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
</groupbox>
|
||||||
|
<hrule/>
|
||||||
|
<grid>
|
||||||
|
<columns>
|
||||||
|
<column/>
|
||||||
|
<column/>
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<description font_style="20" href="40" value="firstname" no_lang="1"/>
|
||||||
|
<textbox blur="Type in a name" id="test_firstname" no_lang="1" size="25" maxlength="40"/>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<description value="name"/>
|
||||||
|
<textbox id="test_name" size="25" maxlength="40"/>
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<button label="new " id="new"/>
|
||||||
|
<button align="right" label="submit" id="submit"/>
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
</template>
|
||||||
|
</overlay>
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dd>
|
<dd>
|
||||||
<ul>
|
<ul>
|
||||||
<li>we have a input-field to enter text</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 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>
|
<li>we have a container to hold our response</li>
|
||||||
</ul>
|
</ul>
|
||||||
@ -281,7 +312,7 @@ security issues, callbacks (e.g. for required field values, etc.
|
|||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
Doing all that, all you have to do, is handling the data.<br />
|
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 />
|
While you control the content of the <tt>$content[...]</tt> array, you control the behavior of your eTemplate.<br />
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
|
Reference in New Issue
Block a user