In Modx, additional fields are attached to templates. I have a lot of resources in the project for which I need to add various additional fields. In this case, the design on all pages (header, basement) is the same. Tell me, please, is it right in such a situation to make a lot of templates, with the same design, just to specify different additional fields for different resources? What better way to do?
1 answer
You can use the "Customize Forms" .
For example, we have a structure:
- Телефоны (10) - Телефон 1 - Телнфон 2 - Холодильники (20) - Холодильник 1 ... Phones and refrigerators have one template, for example ProductTpl . We go to the "Form Settings", create a profile (make it active), then edit it (right click), set a group of users and create a new set of rules .
Select the desired action, set the template (in our cases ProductTpl) and specify the Bounding Ограничивающее поле: parent and Ограничивающее значение: 10 (10 - id группы с телефонами) .
After creating a rule, we can edit it and in the Дополнительные поля tab remove ticks from those tv that are not required to be displayed in this category.
For another resource group, there will be a corresponding rule with its own set of tv that you want to output.