document type inheritance

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

document type inheritance

Tobias Jeger
Hi Hippos,

I have a CMS 7.7 project that uses document type inheritance, i.e. the CND says document type B extends document type A.
I would like to add a field to both types, so I expect it to be sufficient to add it to A, such that B will inherit it. Here's my experience:

Adding the field to document type A works fine. It's a relaxed CND, and after the change, the field shows up in the CMS for existing
and new documents of type A. When I open an existing or new document of type B, the field is not there, however.

I now try to add it manually, by adding the same field to type B, but the CMS complains about the field's path already existing.
So even though the CMS doesn't show the field in the editor, it seems to know that there is already such a field, inherited from type A.

I then turn to the console to have a look at the name spaces. I copy the nodes representing the new field from type A to type B, and
now they show up in the CMS editor for existing and new documents of type B. So my problem is solved.

Also, looking at the name spaces in the console, I see that not all fields shown in the editor for type B show up in the node type definition
for type B. Should I conclude from this that the document type inheritance works for the node type definition (hypposysedit:nodetype subtree),
but not for the editor:templates, and that, when intending to use document type inheritance, you have to set up the editor template manually
through the console?

thanks for sharing your knowledge :-)

Tobi


--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com

_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: document type inheritance

William Borg Barthet
Hey Tobi,

AFAIK the editor templates do not use inheritance. You might want a child document type to show its fields in a completely different way to the parent. I don't think the CMS namespace editor supports the use case you have described, although it should be possible to fix this by making the system check if the path specified exists in the parent type before attempting to create it.. an improvement for the product backlog I suppose.

William


On 7 February 2013 10:35, Tobias Jeger <[hidden email]> wrote:
Hi Hippos,

I have a CMS 7.7 project that uses document type inheritance, i.e. the CND says document type B extends document type A.
I would like to add a field to both types, so I expect it to be sufficient to add it to A, such that B will inherit it. Here's my experience:

Adding the field to document type A works fine. It's a relaxed CND, and after the change, the field shows up in the CMS for existing
and new documents of type A. When I open an existing or new document of type B, the field is not there, however.

I now try to add it manually, by adding the same field to type B, but the CMS complains about the field's path already existing.
So even though the CMS doesn't show the field in the editor, it seems to know that there is already such a field, inherited from type A.

I then turn to the console to have a look at the name spaces. I copy the nodes representing the new field from type A to type B, and
now they show up in the CMS editor for existing and new documents of type B. So my problem is solved.

Also, looking at the name spaces in the console, I see that not all fields shown in the editor for type B show up in the node type definition
for type B. Should I conclude from this that the document type inheritance works for the node type definition (hypposysedit:nodetype subtree),
but not for the editor:templates, and that, when intending to use document type inheritance, you have to set up the editor template manually
through the console?

thanks for sharing your knowledge :-)

Tobi


--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com

_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com

_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: document type inheritance

Wouter Danes-2
In reply to this post by Tobias Jeger

Yes, what you’re saying is true. It might be a nice improvement to be able to say “give me the whole template from the super types”, so like a toggle.

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Tobias Jeger
Sent: donderdag 7 februari 2013 10:35
To: Hippo CMS 7 implementation list
Subject: [Hippo-cms7-user] document type inheritance

 

Hi Hippos,

I have a CMS 7.7 project that uses document type inheritance, i.e. the CND says document type B extends document type A.
I would like to add a field to both types, so I expect it to be sufficient to add it to A, such that B will inherit it. Here's my experience:

Adding the field to document type A works fine. It's a relaxed CND, and after the change, the field shows up in the CMS for existing
and new documents of type A. When I open an existing or new document of type B, the field is not there, however.

I now try to add it manually, by adding the same field to type B, but the CMS complains about the field's path already existing.
So even though the CMS doesn't show the field in the editor, it seems to know that there is already such a field, inherited from type A.

I then turn to the console to have a look at the name spaces. I copy the nodes representing the new field from type A to type B, and
now they show up in the CMS editor for existing and new documents of type B. So my problem is solved.

Also, looking at the name spaces in the console, I see that not all fields shown in the editor for type B show up in the node type definition
for type B. Should I conclude from this that the document type inheritance works for the node type definition (hypposysedit:nodetype subtree),
but not for the editor:templates, and that, when intending to use document type inheritance, you have to set up the editor template manually
through the console?

thanks for sharing your knowledge :-)

Tobi


--

Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com


_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: document type inheritance

Jeroen Reijn
Administrator
As far as I know Frank was trying out some things with inheritence
together with Vivek some while ago. Not sure what the result was
thought :-)

On Thu, Feb 7, 2013 at 10:42 AM, Wouter Danes <[hidden email]> wrote:

> Yes, what you’re saying is true. It might be a nice improvement to be able
> to say “give me the whole template from the super types”, so like a toggle.
>
>
>
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Tobias
> Jeger
> Sent: donderdag 7 februari 2013 10:35
> To: Hippo CMS 7 implementation list
> Subject: [Hippo-cms7-user] document type inheritance
>
>
>
> Hi Hippos,
>
> I have a CMS 7.7 project that uses document type inheritance, i.e. the CND
> says document type B extends document type A.
> I would like to add a field to both types, so I expect it to be sufficient
> to add it to A, such that B will inherit it. Here's my experience:
>
> Adding the field to document type A works fine. It's a relaxed CND, and
> after the change, the field shows up in the CMS for existing
> and new documents of type A. When I open an existing or new document of type
> B, the field is not there, however.
>
> I now try to add it manually, by adding the same field to type B, but the
> CMS complains about the field's path already existing.
> So even though the CMS doesn't show the field in the editor, it seems to
> know that there is already such a field, inherited from type A.
>
> I then turn to the console to have a look at the name spaces. I copy the
> nodes representing the new field from type A to type B, and
> now they show up in the CMS editor for existing and new documents of type B.
> So my problem is solved.
>
> Also, looking at the name spaces in the console, I see that not all fields
> shown in the editor for type B show up in the node type definition
> for type B. Should I conclude from this that the document type inheritance
> works for the node type definition (hypposysedit:nodetype subtree),
> but not for the editor:templates, and that, when intending to use document
> type inheritance, you have to set up the editor template manually
> through the console?
>
> thanks for sharing your knowledge :-)
>
> Tobi
>
>
> --
>
> Amsterdam - Oosteinde 11, 1017 WT Amsterdam
> Boston - 1 Broadway, Cambridge, MA 02142
>
> US +1 877 414 4776 (toll free)
> Europe +31(0)20 522 4466
> www.onehippo.com
>
>
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Jeroen Reijn
Solution Architect
Hippo

Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com

http://about.me/jeroenreijn
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html
Reply | Threaded
Open this post in threaded view
|

Re: document type inheritance

Simon Voortman-2
In 7.8 you'll be able to add the inherited fields to the document template, in the same way that you add other fields.

You can add as many fields from the parent type as desired, and you can make the layout independent of the parent type. The properties will be the same as the parent field.

Kind regards,
Simon


On Thu, Feb 7, 2013 at 10:56 AM, Jeroen Reijn <[hidden email]> wrote:
As far as I know Frank was trying out some things with inheritence
together with Vivek some while ago. Not sure what the result was
thought :-)

On Thu, Feb 7, 2013 at 10:42 AM, Wouter Danes <[hidden email]> wrote:
> Yes, what you’re saying is true. It might be a nice improvement to be able
> to say “give me the whole template from the super types”, so like a toggle.
>
>
>
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Tobias
> Jeger
> Sent: donderdag 7 februari 2013 10:35
> To: Hippo CMS 7 implementation list
> Subject: [Hippo-cms7-user] document type inheritance
>
>
>
> Hi Hippos,
>
> I have a CMS 7.7 project that uses document type inheritance, i.e. the CND
> says document type B extends document type A.
> I would like to add a field to both types, so I expect it to be sufficient
> to add it to A, such that B will inherit it. Here's my experience:
>
> Adding the field to document type A works fine. It's a relaxed CND, and
> after the change, the field shows up in the CMS for existing
> and new documents of type A. When I open an existing or new document of type
> B, the field is not there, however.
>
> I now try to add it manually, by adding the same field to type B, but the
> CMS complains about the field's path already existing.
> So even though the CMS doesn't show the field in the editor, it seems to
> know that there is already such a field, inherited from type A.
>
> I then turn to the console to have a look at the name spaces. I copy the
> nodes representing the new field from type A to type B, and
> now they show up in the CMS editor for existing and new documents of type B.
> So my problem is solved.
>
> Also, looking at the name spaces in the console, I see that not all fields
> shown in the editor for type B show up in the node type definition
> for type B. Should I conclude from this that the document type inheritance
> works for the node type definition (hypposysedit:nodetype subtree),
> but not for the editor:templates, and that, when intending to use document
> type inheritance, you have to set up the editor template manually
> through the console?
>
> thanks for sharing your knowledge :-)
>
> Tobi
>
>
> --
>
> Amsterdam - Oosteinde 11, 1017 WT Amsterdam
> Boston - 1 Broadway, Cambridge, MA 02142
>
> US +1 877 414 4776 (toll free)
> Europe +31(0)20 522 4466
> www.onehippo.com
>
>
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/forums.html



--
Jeroen Reijn
Solution Architect
Hippo

Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 1 Broadway, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com

http://about.me/jeroenreijn
_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html


_______________________________________________
Hippo-cms7-user mailing list and forums
http://www.onehippo.org/cms7/support/forums.html