[Zope-CMF] Re: Q about ZCML in skin folder

Tres Seaver tseaver at palladion.com
Sun Mar 5 09:12:13 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Pratt wrote:
> Hi Tres. The override did the job and Five is not conflicted. Many
> thanks. I have a followup question on the permission namespace.
> 
> I am just learning zcml but there is obviously a difference between
> reading about it and doing something with it (I hoping by asking
> questions and working things out it will get easier :-)).
> 
> From browser in CMFDefault ...
> 
>   <browser:page
>       for="Products.CMFCore.interfaces.IFolderish"
>       name="folder_contents"
>       class=".folder.FolderContentsView"
>       template="templates/folder_contents.pt"
>       permission="cmf.ListFolderContents"
>       layer="cmf"
>       />
> 
> Question is how/where are you deriving the namespace for cmf for
> CMFDefault to get the permission cmf.ListFolderContents?
> 
> I realize in skin we have said that there is a default layer and a cmf
> layer that overrrides it ...
> 
> <configure
>     xmlns="http://namespaces.zope.org/zope"
>     xmlns:browser="http://namespaces.zope.org/browser"
>     i18n_domain="cmf">
> 
>   <browser:layer
>       name="cmf"
>       />
> 
>   <browser:skin
>       name="cmf"
>       layers="cmf default"
>       />
> 
> I ask this because the way I construct my portal product is from a class
> that uses the CMFDefault sources plus my own sources to build it because
> it is too difficult otherwise to handle frequent changes. So when I make
> my portal product, I will be giving the skin layer a name to reflective
> of the product. So lets say the name is testportal:
> 
> <configure
>     xmlns="http://namespaces.zope.org/zope"
>     xmlns:browser="http://namespaces.zope.org/browser"
>     i18n_domain="testportal">
> 
>   <browser:layer
>       name="testportal"
>       />
> 
>   <browser:skin
>       name="testportal"
>       layers="testportal default"
>       />
> 
> I am using a combination of content types, some are default types so I
> will use this as an example.
> 
>   <browser:page
>       for="Products.CMFCore.interfaces.IFolderish"
>       name="folder_contents"
>       class=".folder.FolderContentsView"
>       template="templates/folder_contents.pt"
>       permission="cmf.ListFolderContents"  <-- what should this get
>       layer="testportal"
>       />
> 
> So on permission, what should it get to provide same permission as
> CMFDefault.

Products.Five.permissions declares a bunch of "stock" Zope3 permissions,
using the equivalent permission titles from Zope2 and CMF.


Tres.
- --
===================================================================
Tres Seaver          +1 202-558-7113          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFECvG8+gerLs4ltQ4RAuaXAKCZe4D3rnDbFoHc3oPw2HIjCR9nSQCfUtWr
AdOUhSblA4xl2Q7HyFRkGr0=
=aw45
-----END PGP SIGNATURE-----


More information about the Zope-CMF mailing list