[Zope-CMF] Re: Q about ZCML in skin folder
David Pratt
fairwinds at eastlink.ca
Sat Mar 4 18:08:21 EST 2006
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.
Regards
David
David Pratt wrote:
> Hi Tres. Thank you for your reply. That said, should it remain as it is
> in CMFDefault? I will look at overriding this as you have suggested for
> my own product. Many thanks.
>
> Regards
> David
>
> Tres Seaver wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> David Pratt wrote:
>>
>>> I should clarify this a bit by saying I realize that this is to identify
>>> the default skin, however if I follow this example in my own portal and
>>> give it a different skin name, Five stops and I have a conflict error
>>> between this defaultSkin and defaultSkin for my own portal product. So I
>>> am trying to find out a bit more about this to determine why this is so.
>>>
>>> Regards,
>>> David
>>>
>>> David Pratt wrote:
>>>
>>>
>>>> Could someone tell me what this does in five view for CMFDefault. I am
>>>> trying to get something basic working with my own portal product with
>>>> five but trying to understand the zcml better.
>>>>
>>>> From file CMFDefault/skin/configure.zcml
>>>>
>>>> <browser:defaultSkin
>>>> name="cmf"
>>>> />
>>
>>
>>
>> In a way, this kind of "policy" choice should not be in a
>> redistributable product: instead, that directive should be in
>> '$INSTANCE_HOME/etc/site.zcml'. YOu can work around the problem by
>> using 'includeOverrides' to pull your own ZCML in, which will resolve
>> the convlict.
>>
>>
>> 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
>>
>> iD8DBQFECZnf+gerLs4ltQ4RAtUxAKCjQsrzd0A81FzhjBhzePa4ElYZxgCdFcMH
>> sx9Z59y5P69QKLLREhusqz4=
>> =POm8
>> -----END PGP SIGNATURE-----
>>
>> _______________________________________________
>> Zope-CMF maillist - Zope-CMF at lists.zope.org
>> http://mail.zope.org/mailman/listinfo/zope-cmf
>>
>> See http://collector.zope.org/CMF for bug reports and feature requests
>>
> _______________________________________________
> Zope-CMF maillist - Zope-CMF at lists.zope.org
> http://mail.zope.org/mailman/listinfo/zope-cmf
>
> See http://collector.zope.org/CMF for bug reports and feature requests
>
More information about the Zope-CMF
mailing list