diff --git a/CodeCorner3.md b/CodeCorner3.md index d9c02e2..0e30a16 100644 --- a/CodeCorner3.md +++ b/CodeCorner3.md @@ -117,23 +117,6 @@ Assume that we wanted to name our first eTemplate index.
put in the basic template stuff that is needed to build our template
 	<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)
 
  • Save
  • -
  • now clear cache and cookies of your browser, call Clear cache and register hooks in admin . : +
  • now clear cache and cookies of your browser, call Clear cache and register hooks in admin
  • you should see your new template
  • @@ -256,14 +239,62 @@ those are buttons in a row (of a grid)
    Step 7
    -
    Now our first eTemplate is designed.
    +
    Now our first eTemplate is designed. +
    +<?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>
    +
    + +
      -
    • we have a input-field to enter text
    • -
    • we have a submit button to send our form somewhere (by default back to our very page).
    • +
    • we have some input-fields to enter text
    • +
    • we have a submit button to send our form somewhere (by default back to our very page).
    • we have a container to hold our response
    @@ -281,7 +312,7 @@ security issues, callbacks (e.g. for required field values, etc.
    Doing all that, all you have to do, is handling the data.
    -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 $content['name'] and "who" the field which was intended to hold and display the value of the submitted name via $content['who'].
    +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 $content['name']
    While you control the content of the $content[...] array, you control the behavior of your eTemplate.