[ZPT] StandardLookandFeel example

Miles Waller miles@emotion.co.uk
Sat, 17 Mar 2001 01:53:17 -0000


Thanks for the tip about the installer - i also had a reply from karl who
pointed out that there is a compiled version for windows under
http://www.zope.org/Members/Duncan/WinParsedXML.

now i'm trying out some of the examples from the wiki and i've got a problem
with the standard look and feel one.  i get an error:

Error Type: AttributeError
Error Value: do_<

Traceback (innermost last):
  File C:\PROGRA~1\JAMKIT\lib\python\ZPublisher\Publish.py, line 222, in
publish_module
  File C:\PROGRA~1\JAMKIT\lib\python\ZPublisher\Publish.py, line 187, in
publish
  File C:\PROGRA~1\JAMKIT\lib\python\Zope\__init__.py, line 221, in
zpublisher_exception_hook
    (Object: Traversable)
  File C:\PROGRA~1\JAMKIT\lib\python\ZPublisher\Publish.py, line 171, in
publish
  File C:\PROGRA~1\JAMKIT\lib\python\ZPublisher\mapply.py, line 160, in
mapply
    (Object: loopedxml)
  File C:\PROGRA~1\JAMKIT\lib\python\ZPublisher\Publish.py, line 112, in
call_object
    (Object: loopedxml)
  File C:\PROGRA~1\JAMKIT\lib\python\Shared\DC\Scripts\Bindings.py, line
324, in __call__
    (Object: loopedxml)
  File C:\PROGRA~1\JAMKIT\lib\python\Shared\DC\Scripts\Bindings.py, line
353, in _bindAndExec
    (Object: loopedxml)
  File C:\Program
Files\Jamkit\lib\python\Products\PresentationTemplates\PresentationTemplate.
py, line 281, in _exec
    (Object: loopedxml)
    (Info: {'here': <Folder instance at 010C6A18>, 'template':
<PresentationTemplate instance at 013B5008>, 'nothing': None, 'container':
<Folder instance at 010C6A18>, 'keywords': {}, 'traverse_subpath': []})
  File C:\Program Files\Jamkit\lib\python\TAL\TALInterpreter.py, line 135,
in __call__
  File C:\Program Files\Jamkit\lib\python\TAL\TALInterpreter.py, line 160,
in interpret
  File C:\Program Files\Jamkit\lib\python\TAL\TALInterpreter.py, line 286,
in do_useMacro
  File C:\Program Files\Jamkit\lib\python\TAL\TALInterpreter.py, line 159,
in interpret
AttributeError: (see above)

here are the two templates, called master and simplewelcome respectively:

<?xml version="1.0" ?>
 <html xmlns:tal="http://xml.zope.org/namespaces/tal"
       xmlns:metal="http://xml.zope.org/namespaces/metal"
       metal:define-macro="master">
   <head>
     <title tal:insert="here/title">The title</title>
   </head>
   <body bgcolor="#999999">
     <div metal:define-slot="main">
     If you supply a tag with a 'fill-macro="main"' attribute
     when using this macro, that tag will replace this text.
     </div>
     <p tal:insert="structure here/ZopeAttributionButton"></p>
   </body>
 </html>

<?xml version="1.0" ?>
 <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>

i think the ZPTs are all working okay; if i call the master template the tal
instructions are all interpreted correctly.