On Wed, 2003-09-17 at 19:10, Fred Yankowski wrote:
> On Wed, Sep 17, 2003 at 06:25:47PM -0400, Tres Seaver wrote:
> > I have wanted to add a binding to the TALES namespace to allow access to
> > the "skin object" for some time:  the current values in the namespace
> > are:
> > 
> >     'content' -- the skin object's aq_parent
> That definition matches the reality, but in CachingPolicyManager.py
> in a comment it has this: 
>             'content' -- the content object itself
> which I took at face value for far too long.

Skin objects aren't "content", in the CMF, they are "software", which is
the source of the semantic mismatch.  Skin images and files are somewhat
anomalous in this regard:  they are treated as "skin objects" because
they need to be packaged and delivered with the other skin objects, but
they don't "pretend to be methods on TV" as the other types do.

> > I think we should be adding in another binding, perhaps 'skinned' for
> > the skin object, which would allow you to filter on its metatype in your
> > predicate.
> I would like that.
> > I typically want to have skin images, as well as javascript and CSS
> > files, cached for much longer than rendered content views. YMMV.
> That makes sense.  Is there a way to do that with the CMF 1.4
> version of the "CPM"?  One could, I suppose, test the names of the
> FSDV folders in CPM predicates, but that seems a royal PITA.  That's
> why I'm making do with one-size-fits-all CPM policy for now.

CMF 1.4 makes it easier to leave extensions on files, as well as images,
which means that I have often used a predicate which matches on the
suffix of the name, e.g:

  python: view.endswith( '.png' ) or view.endswith( '.css' )

Tres Seaver                                [EMAIL PROTECTED]
Zope Corporation      "Zope Dealers"       http://www.zope.com

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to