[Product-Developers] Acquisition context inside a Plone behavior

David Glick (Plone) david.glick at plone.org
Wed Jan 29 21:14:58 UTC 2014


It's not a bug. The INameFromTitle adapter is intentionally used before 
the object is added to the object graph, in order to determine what name 
it should be given when added. Use a custom INameChooser if the id 
depends on the container.
David

On 1/29/14, 1:09 PM, Jens W. Klein wrote:
> File a bug?
>
> On 2014-01-29 13:01, ajung wrote:
>> Hi there,
>>
>> I am implementing a customer shortname generation policy (comparable to
>> INameFromTitle) where the behavior implementing the policy must get 
>> hold of
>> the parent folder in order to fetch a configurable prefix that is 
>> used as
>> part of the generated id. I followed the implementation
>>
>> http://stackoverflow.com/questions/7974285/is-there-a-way-to-extend-plone-dexteritys-inamefromtitle-behavior 
>>
>>
>> Unfortunately the 'context' object is not acquisition wrapped. Is 
>> there some
>> way to get hold of the parent object in some way?
>>
>> Andreas
>



More information about the Product-Developers mailing list