[Zope-dev] [Checkins] SVN: zope.traversing/trunk/src/zope/traversing/ Moved the publicationtraverse module from zope.app.publication and added tests.

Hanno Schlichting hanno at hannosch.eu
Sun Jun 21 16:02:55 EDT 2009


On Sun, Jun 21, 2009 at 9:38 PM, Laurence Rowe<l at lrowe.co.uk> wrote:
> Jim Fulton wrote:
>> I don't agree. The semantics are different. For example, you often
>> want to traverse to things in a template that you don't want to expose
>> via URL.  We currently (or last time I checked) expose ++resource+
>> +name in URLs and this is a bug.
>
> What use is a resource without being URL accessible? It's used fairly
> often in Plone products to expose static css / js / images.

You are a victim of Five here and the different semantics of it
compared to zope.app.publisher.

In zope.app.publisher the url for a resource is something like:

<site url>/@@/<name>

where <site url> is basically IAbsoluteURL for zope.site.getSite().

In Zope2 / Five we have:

<context url>/++resource++<name>

instead.

The expression used in page templates to access resources is the same, though.

The reason for this semantic difference is entirely historical. Five
didn't support local component registries / sites at the time when
support for resources have been added. This all happened before those
local registries where simplified in one of the early Zope 3.x
releases.

Hanno


More information about the Zope-Dev mailing list