Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
76bde5e5
Commit
76bde5e5
authored
Jun 30, 1999
by
Michel Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added let tag documentation
parent
6297f70e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
lib/python/DocumentTemplate/Let.stx
lib/python/DocumentTemplate/Let.stx
+36
-0
No files found.
lib/python/DocumentTemplate/Let.stx
0 → 100644
View file @
76bde5e5
The let tag:
is a new tag that lets you create blocks like:
<!--#in "1,2,3,4"-->
<!--#let num=sequence-item
index=sequence-index
result="num*index"-->
<!--#var num--> * <!--#var index--> = <!--#var result-->
<!--#/let-->
<!--#/in-->
Which yields:
1 * 0 = 0
2 * 1 = 2
3 * 2 = 6
4 * 3 = 12
The #let tag works like the #with tag, but is more flexible in that
it allows you to make multiple assignments, and allows you to chain
assignments, using earlier declarations in later assignments. Notice
inthe ablove example, the 'result' variable is based on 'num' and
'index', both of which are assigned in the same #let expression.
Syntacticly, each argument to be evalulated in the head of the let
tag must be seperated by a newline. Enclosing an argument in double
quotes causes it to be evaluated by the DTML expression machinery.
Un-quoted arguments are referenced by name.
Evaluation is in sequence with the result of earlier assignments
available to later ones. Later assignments can also override earlier
ones, which can be helpful for longer step-by-step calculations. The
variables thus set are in effect for the life of the <!--#let-->
block.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment