Jonathan Cyr wrote:
You might want to use index_html rather than index.html in this example. The dot means other things in Python, and index.html is a carryover from filesystem webservers. My impression is that the acquisition mechanism doesn't like ids with a dot, in some circumstances.


Acquisition works fine irrespective of the object id.
And dotted or dashed names work fine in ZPT path:

tal:content="here/my-folder/index.html/title"

If you use python, most objectmanagers support dictionary-like notation:

tal:content="python:here['my-folder']['index.html'].title"

...and if you object doesn't support dictionary-like notation, you can use getattr:

getattr(getattr(here,'my-folder'),'index.html').title

And getattr performs Acquisition just fine...

cheers,

Chris

--
Simplistix - Content Management, Zope & Python Consulting
           - http://www.simplistix.co.uk

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to