Open jmacdonald-spectacle opened 3 years ago
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.
If a plugin is marked as
inactive
<...>. For Template Variables the behavior would be equal.
@JoshuaLuckers TV and Plugins have different behavior by nature, there is no need to make an artificial unification.
Let's take the idea to the absolute and do the same with templates, snippets, chunks, system settings, access rights, etc. Sounds weird.
I think, the OP ran into a typical XY problem.
@mishantrop, Nobody is trying to unify anything. I merely suggested a mechanism that was already in use.
Feature request
Summary
Add the ability to disable a Template Variable
Why is it needed?
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.
Suggested solution(s)
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.
Related issue(s)/PR(s)
Not related to anything I know of.