Search code examples
content-management-systemsitecoresitecore8

Sitecore Set base templates excluding a Field


Is there a way in sitecore where , when you are setting a base template you can exclude a certain field ?

For eg: i have a base template with 4 fields

Name,Id, Salary, Phone number , Facebook Id, Twitter Id, LinkedID

If i have 3 Item Templates FB, Twitter, Lin which has the same Base template -

I would like not to inherit only certain fields - ie, for FB Item I would like to inherit everything except Linkedin and Twitter . And for twitter - everything except FB and Lin.

Please note: this is just an example scenario. This is the best example i could think of. I would like to know if this is feasible with sitecore.

I understand that the ideal option would be to separate out the user info template from social info. But that is just for this scenario.


Solution

  • No. You cannot do this in Sitecore.

    Sitecore template inheritance does not allow excluding certain fields from inheriting in child templates.

    You may consider creating another "base base template" containing only what's needed in all inheriting templates.