[Zope] VERSION 1.00a - DTML CHEAT SHEET & EXAMPLE FOLDER
Theodore Patrick
tpatrick@IndigoNetworks.com
Thu, 23 Sep 1999 21:24:06 -0500
DTML CHEAT SHEET and EXAMPLE FOLDER DOCUMENTATION TREE
There are few USEFUL DTML EXAMPLES of TAG SYNTAX that exist in the
documentation.
I am willing to spend time put together a DTML CHEAT SHEET and EXAMPLE
FOLDER.
To make this truly useful to everyone, everyone needs to contribute what
they know and what they do not. Hopefully we will all fill in the gaps of
knowledge about DTML & ZOPE. Making ZOPE an even better product.
As I realize this might quickly get out of hand, might I suggest some rules
for contributing to this effort.
HERE ARE THE RULES: (PLEASE DO NOT REMOVE - THANKS)
1. ADD THINGS YOU KNOW
2. ADD THINGS YOU DO NOT
3. TRY TO KEEP THEM ORGANIZED.
4. FOLLOW THE SYNTAX FOR EXAMPLES
5. DO NOT DELETE - ADD ALTERNATIVE METHODS i.e. ALT=""
6. ADD HINTS FOR OTHERS
7. NO FLAMES PLEASE OR SEND THEM DIRECT - NOT TO THE LIST
FEEL FREE TO CONTACT ME IF NEEDED:
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<
THEODORE E. PATRICK
http://www.ishophere.com - mailto:tpatrick@indigonetworks.com
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<
VERSION 1.00a - DTML CHEAT SHEET and EXAMPLE FOLDER DOCUMENTATION TREE
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++
ADD WHAT YOU KNOW! ADD WHAT YOU DON'T! WE WILL SEE WHERE WE END UP!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++
+INDEX
??? = NEED HELP AND HAVEN'T A CLUE
ALT = ALTERNATIVE METHOD ;) - Place Alternatives beneath previous
example
HINT = Helpful advice
DC = DIGITAL CREATION ADVICE
+SAMPLE FORMAT
NAME OF ITEM = <dtml-var "DTML TO MAKE THIS HAPPEN"-->
INPUT="input_value" ATTRIBUTES="value" OUTPUT="dtml_output"
+BASIC
ID OF A DOCUMENT = <dtml-var id--> ID="my_document" TITLE="My
Document" OUTPUT="my_document"
TITLE OF A DOCUMENT = <dtml-var title--> ID="my_document" TITLE="My
Document" OUTPUT="My Document"
TITLE OR ID OF A DOCUMENT = <dtml-var title_or_id-->
ID="my_document" TITLE="My Document" OUTPUT="My Document"
TITLE OR ID OF A DOCUMENT = <dtml-var title_or_id-->
ID="my_document" OUTPUT="my_document"
STANDARD HEADER = <dtml-var standard_html_header--> RETURNS DOCUMENT
CONTENT NAMED="standard_html_header (Standard Html Header)"
??? ZOPE ATTRIBUTION LOGO = ???
+STRING CONVERSION PARAMETERS
??? STRING to ALL CAPS = ????
??? STRING to ALL LOW = ????
??? CHARACTER 3 of STRING = ????
+NUMBER CONVERSION PARAMETERS
NUM to NO DECIMAL PLACES = <dtml-var number fmt="%.0d"--> |
number=1.001001 OUTPUT= 1
+ HINT - THIS ONE IS GREAT FOR DECIMAL CONVERSION FROM ORACLE VIA
SQL!!! ;)
NUM to ONE DECIMAL PLACE = <dtml-var number fmt="%.1d"--> |
number=1.001001 OUTPUT= 1.0
NUM to MANY DECIMAL PLACE = <dtml-var number fmt="%.3d"--> |
number=1.001001 OUTPUT= 1.001
+DATE AND TIME CONVERSION PARAMETERS
DATE to DAY_OF_WEEK = <dtml-var date fmt=DayOfWeek> | OUTPUT=
Thursday
+CURRENCY CONVERSION PARAMETERS
??? NUMBER to DOLLARS & CENTS = <dtml-var money
fmt=dollars-and-cents> | money=344.45 OUTPUT= $344.45
??? NUMBER to DOLLARS & CENTS = <dtml-var money fmt=whole-dollars> |
money=344.45 OUTPUT= $344
+OBJECT PARAMETERS
??? LENGTH OF OBJECT COLLECTION = <dtml-var objects
fmt=collection-length> | INPUT="LIST of 20 OBJECTS" OUTPUT= 20
+LOGICAL OPERATORS
STANDARD IF THEN = <dtml-if red>IT IS RED<dtml-var
input_name></dtml-if> | RED=1 OUTPUT="IT IS RED"
STANDARD IF THEN ELSE = <dtml-if red>IT IS RED<dtml-var
red><dtml-else>NOT RED<dtml-endif> | OUTPUT="NOT RED"
+SERVER REQUEST PARAMETERS
??? REDIRECTION OF A REQUEST = ?????
??? HTTP REFERER OF A REQUEST = <dtml-var
_"REQUEST['HTTP_REFERER']"> | OUTPUT="http://www.yahoo.com"
+SERVER COOKIE PARAMETERS
??? READ COOKIE VALUE = <dtml-var _"REQUEST.cookies['CUST_ID']"> |
OUTPUT="2332323"
??? READ LIST OF COOKIE NAMES = <dtml-var _"REQUEST.cookies.keys()">
| OUTPUT="CUST_ID NAME TM_STAMP"
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<
THANKS IN ADVANCE!!
TED ;)