I have a schema which has two fields, "expand" and "website". In website i attached country category, where it has several country keywords. Now for"expand" field , i have one check box value as "yes". Requirement is "yes" should be ticked by default only for few country keywords. Where to make changes.
2 Answers
There are two approaches that can be used:
- Write a GUI extension to look for the field and perform the action of check / un-check based on it. You can refer to the following link to find out the field that you are looking for (like website and expand) and then you can attach event to website field based on which you can check or uncheck expand field.
- Develop a custom UI and use it to create new component with all the business rules that can be defined in configuration file. This UI can be invoked from ribbon bar or right click on schema (you can say create component). With custom UI you will more flexibility on all the permutations that you want to achieve. Use core service to save the changes.
I would recommend approach#2 as first approach will be very specific implementation where you will be trying to manipulate the output generated by Tridion which you will have to revisit with every upgrade.
Adding to Hiren's answer, If you want to address the core issue with out any extension and want an OOB solution, I would suggest the following:
- Add metadata to the country keywords and in the metadata, add the field “Expand”. Set the default value for expand there for that particular country.
- Keep the “Expand” field in the component, in case you want to override the default value in any specific component.
So with this while creating a component, you will get the default value of "Expand" within the country keyword and in case you want to override it you can do it in component content.