[z3-five] BrowserView and AttributeError on getPhysicalPath

Tim Hicks tim at sitefusion.co.uk
Wed Jul 12 15:07:42 CEST 2006


Hi,

I have a view.py module that looks like:

   # Five imports
   from Products.Five import BrowserView
   from Products.Five.browser.pagetemplatefile \
       import ZopeTwoPageTemplateFile as PageTemplateFile


   class TopicView(BrowserView):
       """
       """

       topic_listing  = PageTemplateFile('./topic_listing.pt')
       author_listing = PageTemplateFile('./author_listing.pt')
       topic_view     = PageTemplateFile('./topic_view.pt')


I have a ZCML snippet that looks like:

   <browser:page
       for=".interfaces.IWeblog"
       class=".browser.view.TopicView"
       attribute="topic_listing"
       permission="zope2.View"
       name="topics" />


When I visit a URL like .../[my_IWeblog_instance]/topics/ I get:

   Traceback (innermost last):
     Module ZPublisher.Publish, line 107, in publish
     Module Zope2.App.startup, line 227, in recordMetaData
     Module OFS.SimpleItem, line 380, in getPhysicalPath
   AttributeError: getPhysicalPath


I'm trying to use the PageTemplateFiles with the Plone UI/macros.

Does anyone have any idea why this isn't working?


Thanks,


Tim


More information about the z3-five mailing list