Under Community Review

It is an interesting request, but in order for us to evaluate we would like to understand the reason for changing the schema. 

Because changing the schema for a component also changes the namespace, there are some challenges keeping existing data, if that was one of your expectations on this too.

Looking forward to hearing some more context and background on this request as it will help us find the right solution.

Ability to change chosen schema for component after saving it

Hello, 

For components, a schema cannot be changed once the component is created, saved and closed. 

For a page, component templates can be changed anytime from a drop down menu.

Can we have the option or flexibility to change a component schema?

Thank you and regards, 

D

  • It's not actually true that you can't change the schema. It's just not supported in the user interface, IMO with good reasons. It's actually pretty trivial to change it from a core service script. Just load the component, change the Schema Id and save it again. The proviso, of course, is that schema validation will kick in, so you can only save the component if it complies with the new schema. The use case for this technique is usually that some misguided person in the past has insisted on using a shared schema in a situation where the nature of the content doesn't justify this. You decide to split the components between two schemas so that they can have a healthy future apart from each other. In this case, you may well be planning to alter one or both of the schemas at some point, but in this beginning phase, you've just made a copy of the schema, so all your components are compliant with both. (In practice, you may well find that earlier schema changes haven't been synced, and you have components that you can't save anyway without fixing them, but that's another story.) 

    In this kind of project, you are going to do an analysis of what you're doing ahead of time, and think about it a fair bit. Writing a few lines of script is not the bulk of the work. I'd say that adding a drop down to the user interface is an invitation to miss out the analysis phase. It won't be fun. 

  • Hello team, it is the ability to change the schema with existing content on it. For example like the way its in pptx you can have the content in the slide and can change the layout and look of it. I understand its more than just a look in here. Thanks!