I have a property on my page, that is either set on the page, or one of it's ancestors.
How do I get this value in my Razor view please? The value could be set on the page itself, or in any ancestor page? I want to avoid the editor having to add the same value again on all child pages, and just inherit the value down the content tree.
Umbraco 8 - Property Inheritance
I have a property on my page, that is either set on the page, or one of it's ancestors.
How do I get this value in my Razor view please? The value could be set on the page itself, or in any ancestor page? I want to avoid the editor having to add the same value again on all child pages, and just inherit the value down the content tree.
All the pages will be the same Document Type.
Hi Danny,
You can use fallbacks on Umbraco properties. See here:
https://our.umbraco.com/documentation/reference/querying/ipublishedcontent/Properties/#fallbacks
Cheers,
Marc
That's perfect, thank you.
I am just starting to get my head around the Umbraco API, after working with Kentico for many years.
Hi Danny,
You're welcome. We have been working with Umbraco for a long time and have built a ton of features into our uSkinned Site Builder for Umbraco.
You can try it out for free here. We will send you a link to a hosted trial so that you can get a feel for the power of Umbraco.
https://trial.uskinned.net
Cheers,
Marc
is working on a reply...