How to disable metadata inheritance?

Alex B asked on March 10, 2020 15:08

Is there a way to add metadata to a page without having all of the child pages inherit the same metadata by default? Now, it seems like I need to go to each child page and remove the inherited metadata manually. The settings I've tired didn't seem to work.

Recent Answers


Brenden Kehren answered on March 10, 2020 20:00

If you have metadata set at the root of the site (/ master page), then by default it automatically inherits down through each node in the tree.

Assuming you don't have a ton of metadata setup for pages already, your best bet would be to set the default metadata to empty values. Then go to the pages you want to have empty values or not inherit metadata and uncheck the inherit box. Then go back to the master page and set the metadata to what you had or want it to be.

This will allow you to NOT have to go to each page and manually remove it once you stop inheritance. Another option is to update the content tree via code (not SQL)and set the properties to not inherit and null values.

0 votesVote for this answer Mark as a Correct answer

Delete Agency answered on March 11, 2020 10:35

Hi Alex,

Do you explicitly use inherited metadata? As it seems to be working only if you call GetInheritedValue:

var description = currentDocument.GetInheritedValue("DocumentPageDescription");

Because if not, and you just retrieve currentDocument.DocumentPageDescription it doesn't take inheritance into account. So it will return empty, even if inheritance is enabled.

0 votesVote for this answer Mark as a Correct answer

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