[Zope-CMF] Folders within Layers? Is it possible?
Beef a
beef005 at hotmail.com
Thu Oct 30 04:54:30 EST 2003
Howdy All,
I'm working on CMFing an existing Zope Product and have run into a few
challenges with 'skinning'.
1. The product has lots (potentially hundreds) of skinnable elements (icons,
dtml etc) arranged in a nice heirarchy.
2. I'd like to keep the skinnable elements organised in a hierarchy rather
than flatten it out - which seems to be the standard approach.
3. So I've done this;
a). Created a regular Folder object (called MyProduct) in the SkinsTool
(portal_skins), and
b). Created sub-folders (File System Directory Views) within MyProduct to
create the necessary hierarchy.
(this also stops me having to define hundreds of layers)
eg: So you can imagine my portal_skins folder looks something like this;
portal_skins/MyProduct/Part1/icon.gif
portal_skins/MyProduct/Part1/hello.dtml
portal_skins/MyProduct/Part2/icon.gif
portal_skins/MyProduct/Part2/hello.dtml
where Part1 and Part2 are Directory Views (again, there can be hundreds of
'Parts')
Note: Unique 'Part' names are used because elements are not necessarily
unique (and can't be guaranteed to be unique). eg: there may be many unique
'Parts' but all may have an 'icon.gif'
3. Everything works fine so far accept when I attempt to access DTML.
eg: I can access http://<object>/Part1/icon.gif and
http://<object>/Part2/icon.gif perfectly... but not
http://<object>/Part1/hello
Depending on how I attempt to access a DTML object, I get one of two
possible errors;
ERROR 1: Attempting to access http://<object>/Part1/hello (directly via the
browser)
Module ZPublisher.Publish, line 150, in publish_module
Module ZPublisher.Publish, line 114, in publish
Module Zope.App.startup, line 199, in zpublisher_exception_hook
Module ZPublisher.Publish, line 98, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 39, in call_object
Module Products.CMFCore.FSDTMLMethod, line 141, in __call__
Module DocumentTemplate.DT_String, line 474, in __call__
ERROR 2: Occurs when attempting to access via a CMF action; eg:
http://<object>/view where the view action has the URL Part1/hello
Traceback (innermost last):
Module ZPublisher.Publish, line 98, in publish
Module ZPublisher.mapply, line 88, in mapply
Module ZPublisher.Publish, line 39, in call_object
Module Products.CMFCore.PortalContent, line 125, in view
Module Products.CMFCore.PortalContent, line 112, in __call__
Module Products.CMFCore.utils, line 163, in _getViewFor
- __traceback_info__: ('Tutorial', 'Part1/hello')
Module OFS.Traversable, line 172, in restrictedTraverse
Module OFS.Traversable, line 154, in unrestrictedTraverse
- __traceback_info__: ([], 'hello')
TypeError: unsubscriptable object
ASIDE: Customisation works perfectly for non-DTML (the icons) when I place
new icons in the custom folder with an appropriate Part folder ;)
So does anyone know what the problem is here?
For the first error it seems the FSDTMLMethod doesn't seem to be aquiring
the <Object>.
For the second error it seems we can't traverse into File System Folders.
------------
Here's my setup:
Windows XP SP1 (+ every security patch in the world)
Zope 2.6.2
CMF 1.4.2
Any help would be HUGELY appreciated.
Cheers
-- Brian
_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today!
http://www.msn.co.uk/messenger
More information about the Zope-CMF
mailing list