[Product-Developers] Create new plone.app.page type
Maarten Kling
maarten at fourdigits.nl
Thu Jul 21 12:17:09 UTC 2011
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
regards,
Maarten
On 7/21/11 12:18 PM, Martin Aspeli wrote:
> On 21 July 2011 08:53, Maarten Kling<maarten at fourdigits.nl> wrote:
>> Hello Martin,
>>
>> I already got:
>>
>> -- person.py --
>> class IPerson(IPage):
>> """ my schema here"""
>>
>> class Person(dexterity.Item):
>> grok.implements(IPage)
> Why do you need this class? Also: note that the Page type is a Container.
>
> I'm not sure what's not working for you, so it's a bit hard to debug.
>
> 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
More information about the Product-Developers
mailing list