简体   繁体   中英

Remove / hide an inherited property from Content Page

I have a RTE property for bodyText set in Master docType, so all my pages have a bodyText property.

But in some pages I need to have a custom RTE for better WYSIWYG, so I need to use the custom RTE in some pages and remove / hide the inherited RTE from Master. How?

To my knowledge, Umbraco does not allow you to override properties inherited from master document types, and trying to add properties with the same ID in a document as in the master doctype throws a System.Web.HttpException.

But there is nothing keeping you from having multiple layers of inheritence.

The way I would solve this, would be to have a Master document type called Base with all the properties that are in fact shared between all the pages, and then create 2 document types with Base as their master doctype. We could call them Standard RTE and Custom RTE .

You move the RTE property a level down, and put it on Standard RTE doctype , and you put the Custom RTE property on the Custom RTE doctype

This way you can define the exact properties you want on each document type by using either of these as the master doctype, while still allowing all your pages to inherit properties from a common master doctype.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM