Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] ToggleTVSet to work with bindings (@SELECT) #7

Open
jonleverrier opened this issue May 2, 2017 · 1 comment
Open

[FEATURE] ToggleTVSet to work with bindings (@SELECT) #7

jonleverrier opened this issue May 2, 2017 · 1 comment

Comments

@jonleverrier
Copy link

jonleverrier commented May 2, 2017

Problem
When the value of a toggle tv set is updated, all resources with that assigned tv need resetting (this is default MODX behaviour, nothing todo with ToggleTVSet). This is problematic when you have a site with a large amount of resources which all need changing (more info here).

Solution
Allow ToggleTVSet to work with something such as SetInputOptions. SetInputOptions gives you a CMP which allows you to manage values of a TV, by inserting a query statement in the input field of a TV. These values are stored in the database.

A more generic summary is to enhance ToggleTVSet so it can use @SELECT query statements in an input field of a TV, so it can retrieve the values from the database.

Observed Behaviour
At the moment using a @SELECT query statement inside a ToggleTVSet TV causes some problems, such as;

  1. On initial load - all TV's are displayed
  2. After save, the "hideTVs" option in the <head> doesn't pull in the TV ID's, which means the TVs aren't hidden in the manager any more.
  3. "showTVs" value is displaying an incorrect TV ID

What works:

  1. The toggle sets toggle, but when selected and saved, all tv's are displayed again
  2. Using a query statement, the name of the options appear to be loading in fine (but perhaps the value isn't being pulled in)
@jonleverrier jonleverrier changed the title ToggleTVSet to work with SetInputOptions [ FEATURE ] ToggleTVSet to work with bindings (@SELECT) May 3, 2017
@Jako Jako changed the title [ FEATURE ] ToggleTVSet to work with bindings (@SELECT) [FEATURE] ToggleTVSet to work with bindings (@SELECT) Apr 24, 2018
@Jako
Copy link
Owner

Jako commented Jun 8, 2022

Maybe this is solved with the new Toggle TV custom template variable in 2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants