[Erp5-dev] how to really hide some allowed portal types

Mikolaj Antoszkiewicz mikolaj at erp5.pl
Wed Nov 28 11:37:02 CET 2007



Yoshinori Okuji wrote:
> On Tuesday 27 November 2007 15:46, Mikolaj Antoszkiewicz wrote:
>> Is there a way of modifying the stock Allowed Portal Types list without
>> using Hidden Portal Types and modifying stock BusinessTemplate?
>>
>> Or the other way, is there a 'proper' way of stopping 'New' icon on the
>> module form (Folder_create()) from creating random object from Allowed
>> Portal Types list, even though it is hidden?
> 
> You can fix the tales expression in the page template, so that when no portal 
> type is allowed, no new icon is shown.
> 
> YO

That's a good idea. Although I'm in a situation where I have 2 out of 5 
portal types hidden, and when I click the new icon the hidden type gets 
created.

Is there any other way besides patching or overwriting Folder_create() 
method?

Mikolaj



More information about the Erp5-dev mailing list