Show / hide logic in Tridion Schemas?
A text fields that uses a Category (with nested Keywords presented with the Tree option) is probably the closest thing we have in Tridion that presents additional options after a user selects an initial option. But this only works for selections.
Separate Schemas Rather than Component Links
For two Schemas with different fields, but a common Title or Heading, I'd recommend separate Schemas rather than a GUI extension or Component links as seen below:
Main Schema A (Component Schema)
- >Field A (title)
- >Field B (Embedded Schema A)
Main Schema B (Component Schema)
- >Field A (title)
- >Field B (Embedded Schema B)
If the title, A, or B were usable or presentable on their own I might suggest three Schemas, especially if using Experience Manager, SDL Mobile, and/or SmartTarget.
I point out when near duplicate schemas make sense in this post.
Advantages of separate Schemas (not Component links) include permissions control and the ability to set a default set of fields (linked Schema as a default) for a given folder. Having them separate also simplifies template development and dynamic functionality (query by Schema rather than if/else logic in templates).
Recommendations if you separate Schemas:
- If they're related, use a naming convention that places the two Schema next to each other in the drop-down list (e.g. Article Press Release and Article Blog)
- Optionally use the same field names, to simplify template development
- However, use specific field descriptions (see tips in this post)
If you do Component links, be sure to restrict the options to only the right Schema.
For a GUI extension or automation with the Event System, I'd look at the entire editorial process, including Experience Manager (XPM). For a given task in terms of creation, updates, and re-use (read that as a variation on CRUD), I'd look to optimize the most tedious parts for editors.
For example, even with a Component that had all the fields, if using XPM Page Types or Content Types, creation is optimized since editors don't need to fill out all the fields. However, edits and re-use might be harder because you have more fields in fewer Schemas.