-
- 55 Posts
Hi everyone!
MODX Revolution 2.2.10-pl (traditional)
I'm stuck with problem-
I have two TV for the template: COUNTRIES and CITIES.
How can I pull all cities names depending on COUNTRIES TV selection (dropdown list input type both)?
Another words- I choose country name and get all cities in there as a dropdown list in COUNTRIES TV.
Thank you for all the ideas and solutions!
You have to somehow link the cities to their countries, making a virtual tree-like structure. Like the way resources have a "parent" field, or elements have a "category" field.
If they're just stored in two TVs, I don't see how you could have any connection.
-
- 55 Posts
Quote from: sottwell at Dec 26, 2013, 11:32 AMYou have to somehow link the cities to their countries, making a virtual tree-like structure. Like the way resources have a "parent" field, or elements have a "category" field.
If they're just stored in two TVs, I don't see how you could have any connection.
sottwell thanks for your reply!
I'm thinking toward direction
country TV => cities chunk values => cities TV for each select option in TV dropdown.
So if I choose some value in the country TV I get values of city names as a list in the second (cities) TV.
May be
BINDINGS will help?
Which version of MODx are you using? If you're using Revo, MIGx would be the way to go. Your Country items would each have an inner MIGx cities grid.
I'm pretty sure Evo has a multi-grid TV extra available too, but I don't know what it is.
-
- 5,888 Posts
Um... "Dynamic dropdown custom template variable for MODX Revolution."
-
- 55 Posts
Quote from: Bruno17 at Dec 26, 2013, 06:10 PMthere is http://modx.com/extras/package/dynamicdropdowntv
Quote from: sottwell at Dec 26, 2013, 07:18 PMUm... "Dynamic dropdown custom template variable for MODX Revolution."
Bruno17, sottwell,
thank you for the idea!
I'll try to use it
-
- 5,888 Posts
Here's a bit of Docu, how to use it.
https://github.com/Bruno17/DynamicDropdownTV
There are different ways.
You can use input-option-values
or processors to get the options.
Is this for back-end? I was under the impression that this was supposed to be on the front-end.
-
- 55 Posts
sottwell,
Yes, it's for back-end.
To use in the Manager.
I'm doing real-estate website. When add new real estate property you choose country first and then you get drop down list of cities of choosen country. Both listts as a TV dropdown.
Sorry I was not exact in my question.....