[ZDP] BackTalk to Document The Zope Book (2.6 Edition)/Advanced
Page Templates
webmaster at zope.org
webmaster at zope.org
Sun May 2 14:20:27 EDT 2004
A comment to the paragraph below was recently added via http://zope.org/Documentation/Books/ZopeBook/2_6Edition/AdvZPT.stx#4-106
---------------
Modules can be grouped into packages, which are simply a way
of organizing and naming related modules. For instance,
Zope's Python-based Scripts are provided by a collection of
modules in the "PythonScripts" subpackage of the Zope
"Products" package. In particular, the "standard" module in
this package provides a number of useful formatting functions
that are standard in the DTML "var" tag. The full name of
this module is "Products.PythonScripts.standard", so you could
get access to it using either of the following statements::
tal:define="global pps modules/Products/PythonScripts/standard"
tal:define="global pps python:modules['Products.PythonScripts.standard']"
% Anonymous User - May 2, 2004 2:20 pm:
The path sintaxt actually doesn't work. You will receive an Unauthorize exception, even if you implement the
correct security assertions. With the python one you won't have this problem. The correct sintax would be:
tal:define="global pps modules/Products/PythonScripts.standard"
tal:define="global pps python:modules['Products.PythonScripts.standard']"
More information about the ZDP
mailing list