[Zope] ZPT and SESSION variable
Andreas Tille
tillea@rki.de
Thu, 26 Sep 2002 15:34:29 +0200 (CEST)
Hello,
searching the web for the subject keywords I found:
http://www.zopelabs.com/cookbook/1024946669
If I try this example:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html>
<head>
<title tal:content="template/title">Influenza</title>
<link rel="stylesheet" type="text/css" href="influenza.css">
</head>
<body metal:define-slot="body" tal:define="global session here/session_data; global pss modules/Products/PythonScripts/standard">
...
-->
Errors
Compilation failed
TAL.TALDefs.METALError: define-slot must be within a define-macro, at line 7, column 1
Any hint how to do this right or any other possibility to foreward a variable
to a page template by a python script?
My intend was something like this:
session=context.REQUEST.SESSION
session['var'] = 'variable'
if REQUEST is not None:
return container['test.html'](REQUEST)
But may be I could foreward var in any other way and this I would not
neet the SESSIOn variable.
Kind regards
Andreas.