[Zope3-dev] Paths in ZCML
Jeffrey P Shell
jeffrey@cuemedia.com
Sat, 4 Jan 2003 11:37:04 -0700
Yesterday evening I threw together a quick reStructuredText document
for Zope 3 (a1) to catch back up on the whole "Zope 3 experience". One
stumbling block I came across was when trying to refer to the
'preview.pt' template from src/zope/app/browser/content in my
configure.zcml file. My code looks like this (it's living in a package
called 'js.rest')::
<browser:page
for=".interfaces.IReSTDocument"
name="preview.html"
menu="zmi_views"
title="Preview"
template="../../src/zope/app/browser/content/preview.pt"
permission="zope.ManageContent"
/>
As you can see, the `template` argument has to go '../..' to get back
to the Zope 3 root, which requires my root package 'js' to always be in
the root as well. Has there been any thought to how to deal with this
situation? I noticed it when wanting to use the default 'document.gif'
icon as well, but I just copied that to my package.
--
Jeffrey P Shell
jeffrey@cuemedia.com