Add the ability to disable a Template Variable
Sometimes a TV isn't currently necessary: either for testing or there is a problem with processing. In a complex site, disabling the TV for each template is time-consuming and, if the templates must be re-enabled, error-prone. Disabling through Manager Customization is time-consuming for the same reasons.
I'd like to see a checkbox on the 'General Information' tab of a TV. It should be unchecked by default and its label should be 'Inactive' to match the behaviour of Plugins.
Not related to anything I know of.
TV has a template tab where you can turn off TV for templates, there is a filter, sorting, etc.
In my opinion, turning off the TV with new checkbox is unnecessary behavior.
Because confusion will arise, for example: TV is configured, specified for the template, but does not work, but it turns out that TV needs to be turned on (if someone turned it off before).
And if I turned off TV through a new checkbox, how can I turn on TV for some templates? If through the templates tab, then TV will turn on automatically for all templates for which TV was set or what?
As I said, complex sites can make turning templates on and off difficult.
The TV would be enabled by default, so I don't see the confusion. Existing functionality would remain. This is a 'master switch.'
I like this feature request and the proposed solution.
Because confusion will arise, for example: TV is configured, specified for the template, but does not work, but it turns out that TV needs to be turned on (if someone turned it off before).
And if I turned off TV through a new checkbox, how can I turn on TV for some templates? If through the templates tab, then TV will turn on automatically for all templates for which TV was set or what?
If a plugin is marked as inactive you are still able to select the system events it should listen to. For Template Variables the behavior would be equal.
Yes, I propose a checkbox on the General Information tab. Easy to see.
TVs would still be available to select in Template elements as well as Form Customization, they would just be ignored by chunks and snippets.
Another use case: I start new projects with a master copy of a website. Being able to disable TVs for certain clients would be helpful.
Some extras like getResources, pdoResources etc. have to be modified after adding this option.
@Jako I suppose that's true.
I'm mainly interested in hiding a tv in the Manager. Maybe a label of 'Hidden' or 'Hidden in all templates' would work. This would have the same effect as Manager customization without all the customizing.
Most helpful comment
Another use case: I start new projects with a master copy of a website. Being able to disable TVs for certain clients would be helpful.