mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
Updated CodeCorner3 (markdown)
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>
|
||||
<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/>
|
||||
@ -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>
|
||||
<?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>
|
||||
<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 />
|
||||
|
||||
<dl>
|
||||
|
Loading…
Reference in New Issue
Block a user