[Zope] ZPT - how to get started with Macro, I get "version None" error
Brad Clements
bkc@murkworks.com
Fri, 13 Apr 2001 15:43:05 -0400
On Zope 2.3.1 without ParsedXML on Linux RH 7.0
I installed TAL and PageTemplates per instruction.
I'm trying to use SimpleWelcome and the master macro.
I created a folder named "test"
In there I created two page templates, one called Welcome, with the SimpleWelcome
text (modified) and the other template is called "master" with the sample master macro.
I changed SimpleWelcome to be something like this:
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
metal:use-macro="here/master">
<body>
<div metal:fill-slot="main">
<p>Welcome to the machine</p>
</div>
</body>
</html>
(also tried "container/master")
In both cases I get:
<!-- Page Template Diagnostics
Macro expansion failed
TAL.TALDefs.METALError: macro 'here/master' has incompatible version None, at line 1, column 1
('/home/bkc/ADKWood/lib/python/TAL/TALInterpreter.py', 384, 'do_useMacro', 'self.position)')
('/home/bkc/ADKWood/lib/python/TAL/TALInterpreter.py', 224, 'interpret', 'apply(method, args)')
('/home/bkc/ADKWood/lib/python/TAL/TALInterpreter.py', 197, '__call__', 'self.interpret(self.program)')
('/home/bkc/ADKWood/lib/python/Products/PageTemplates/PageTemplate.py', 153, 'pt_render', 'tal=not source, strictinsert=0)()')
('/home/bkc/ADKWood/lib/python/Products/PageTemplates/PageTemplate.py', 184, 'read', 'return self.pt_render(source=1)')
-->
I also tried making Master just a DTML method.. No change. Does "master" have to be
a ParsedXML document?
I just need a little boost to get started, does anyone have this working on their Zope?
Brad Clements, bkc@murkworks.com (315)268-1000
http://www.murkworks.com (315)268-9812 Fax
netmeeting: ils://ils.murkworks.com AOL-IM: BKClements