summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0dee7f3)
raw | patch | inline | side by side (parent: 0dee7f3)
author | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 27 Aug 2002 08:34:32 +0000 (08:34 +0000) | ||
committer | richard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2> | |
Tue, 27 Aug 2002 08:34:32 +0000 (08:34 +0000) |
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@995 57a73879-2fb5-44c3-a270-3262357dd7e2
doc/templating.txt | patch | blob | history |
diff --git a/doc/templating.txt b/doc/templating.txt
index a36922f74ef0465aab06bf0eff3412f4b278ef98..95e2972db82fc5287e75e02b925201122ab4acee 100644 (file)
--- a/doc/templating.txt
+++ b/doc/templating.txt
HTML Templating Mechanisms
==========================
-:Version: $Revision: 1.11 $
+:Version: $Revision: 1.12 $
Current Situation and Issues
============================
"root level" (that is, directly accessible in the TALES namespace) variables
defined:
-*user*
- The current user node as an HTMLItem instance
-
*class*
The current class of node being displayed as an HTMLClass instance
name, thus "user/name" and "user/name/menu" will still work - the latter
will pull information from the form if it can.
+ this is a dangerous attribute, and may cause us pain the long run (its name
+ may clash with other top-level variables ... it already clashed with the
+ proposed *user* variable). It might be safer to go with just *class* and
+ *item*, actually...
+
*form*
The current CGI form information as a mapping of form argument name to value
- the current index information (``filterspec``, ``filter`` args,
``properties``, etc) parsed out of the form.
- methods for easy filterspec link generation
+ - *user*, the current user node as an HTMLItem instance
*instance*
The current instance
*modules*
python modules made available (XXX: not sure what's actually in there tho)
-Accesses through the *user*::
-
- class HTMLUser:
- def hasPermission(self, ...)
-
-(note that the other permission check implemented by the security module may
- be implemented easily in a tal:condition, so isn't needed here)
-
-Accesses through a class (either through *class* or *db.<classname>*):
+Accesses through a class (either through *class* or *db.<classname>*)::
class HTMLClass:
def __getattr__(self, attr):
def __init__(self, ...)
def filterspec(self, ...)
+Accesses through the *user* attribute of *request*::
+
+ class HTMLUser(HTMLItem):
+ def hasPermission(self, ...)
+
+(note that the other permission check implemented by the security module may
+ be implemented easily in a tal:condition, so isn't needed here)
+
Template files
~~~~~~~~~~~~~~