[Product-Developers] Create new plone.app.page type

Maarten Kling maarten at fourdigits.nl
Fri Jul 22 07:24:44 UTC 2011


My thoughts exactly, but when importing all xml steps from portal_setup:
ValueError: undefined property 'default_site_layout'

Getting same error when referencing from IPageFTI
The default_site_layout is defined in the XML


Maarten


On 7/21/11 8:13 PM, Martin Aspeli wrote:
> On 21 July 2011 13:17, Maarten Kling<maarten at fourdigits.nl>  wrote:
>> lets try again :)
>> I like to create a new type called Person for use in deco, based on the Page
>> type.
>>
>> There is a way of doing this by hand:
>> http://localhost:8080/Plone/@@deco-controlpanel#fieldsetlegend-page-types
>> - click Add
>> http://localhost:8080/Plone/@@add-page-type?form.button.AddPageType=Add
>> - name it Person
>> Looking at: http://localhost:8080/Plone/dexterity-types
>> There are now 2 types, one called Page, and the second called Person.
>>
>> When i add a field to the Person type:
>> http://localhost:8080/Plone/dexterity-types/person/@@add-field
>> It is also added to the Page type and that is something i don't want.
>>
>> When i create a new type in code i'm not able to inherit it from the
>> Page(FTI) type.
>> Module plone.app.page.content, line 34, in setDefaultLayoutForNewPage
>> ValueError: Cannot find layout template for person
> If you're doing this on the filesystem, I would:
>
>   - Create a new schema that derives from IPage and has your new field(s)
>   - Copy the FTI XML for the 'person' type you created in the steps above
>   - Change the reference to the IPage schema to be your new IPerson schema
>
> Martin

-- 
Maarten Kling
http://fourdigits.nl/mensen/maarten-kling

Four Digits BV
http://www.fourdigits.nl
Willemsplein 44, 6811 KD, Arnhem
tel: +31 (0)26 4422700 fax: +31 (0)84 2206117
KVK 091621370000 BTW 8161.22.234.B01

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20110722/44b6f37c/attachment.html>


More information about the Product-Developers mailing list