2

I would like to clean up the Tridion Schemas in a large implementation and remove any unused fields. I'm curious to hear how you might solve the challenge, and am not looking for a code solution at this moment.

I was thinking to write a .Net Core Service app, get the XSD Schema, update it in code to set minOccurs to 1 for every field (even if it is really optional), and then try to validate the Component XML against it.

And, then log the fields that do not contain content.

Another way would be to log each time a field does have content, and then at the end manually look at the fields and see if any are not logged (ie. never had content).

What other approaches might work? Thanks!

2 Answers 2

3

I'd suggest writing a core service app/script that simply does a where-used on the schema and enumerates which components have a value for that field. I wouldn't mess with schemas beyond reading them to see which fields are interesting (and how exactly to express your query).

0

I remember back in 2012, maybe 2013, Puf demoed an extension that he wrote where he hooked up Google Analytics to various fields and events in the CM via Anguilla. This might be a good approach to what you're trying to achieve.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.