Page type fields which inherit content from parent

Tom Troughton asked on May 15, 2015 10:55

Does anyone know if it's possible to add a text field to a page type which behaves like fields on the metadata tab, i.e. offers user ability to inherit content from parent?

Correct Answer

Charles Matvchuk answered on May 15, 2015 15:06

Use a macro to default the field. If you populate it with anything else then the new values will be saved.

2 votesVote for this answer Unmark Correct answer

Recent Answers


Brenden Kehren answered on May 15, 2015 13:55

Page types can inherit other page types. You can also set your page templates to inherit one another. It's not the same exact functionality as the metadata tab but close if you know how to configure either of those.

0 votesVote for this answer Mark as a Correct answer

Tom Troughton answered on May 15, 2015 14:50

Yes, I understand about page types and page templates and their approach to inheritance. I was specifically looking for a form field that inherits content if the same field is present in the parent page, with option to overwrite. I guess the answer is no! Thanks for your time as always.

0 votesVote for this answer Mark as a Correct answer

Tom Troughton answered on May 15, 2015 15:26

Ah, very interesting idea. Thank you Charles, I will take that approach.

0 votesVote for this answer Mark as a Correct answer

Charles Matvchuk answered on May 15, 2015 15:58 (last edited on December 10, 2019 02:30)

@Nat, what I do is write some pretty complex macro's to determine meta data that get their default data from the Parent or from other pages in the path. Then I overwrite when necessary. Also another thing that I do is that to the "Page" Document Type I added field called Page Header H1, in which I default the Brand and then document name for instances

Company {% DocumentName %}

That way all my H1's are uniform with proper branding, I have seen a significant uptick in SEO.

To further explain, in my master page I have a static text web part and I resolve the Text to

{% if (CurrentDocument.PageHeaderH1 != null) {CurrentDocument.PageHeaderH1} else {CurrentDocument.DocumentName} |(identity)GlobalAdministrator%}

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.