I need the possibility to show some content/images only for specific countries. Now it would be great to have a Country picker in the way the multinode picker does work.
So i think i need to add a datatype called "CountryList" which includes all countries.
For each content i should be able to select the country the images/content should be shown. This must be also a multipicker.
For selecting the country i think i would try to use an IP locator or the user has to select it on a landingpage
I think what you'll have to do is create nodes for all your Countries and use MultiNodeTreePicker to select them.
For example, create a doctype called CountryList and a doctype called Country (Name, Code, etc...). Then create the CountryList, probably somewhere outside of your site's content node (I usually create a "Backoffice" node at level 1). Then add your Countries underneath.
You can then create a MultiNodePicker datatype and set the start node to the CountryList and add it to your doctype.
This might not be ideal and might be tedious if there's a lot of possible countries, but it's the best way I can think of without doing any custom datatype development. There is a Country Picker already in uComponents but it only supports a single selection.
Yes i think the countryPicker is a good solution for it.
One question about it:
I saw the values are for example "France" but how can i set this to the ISO country code. Is this possible?
What is the best solution to store the selected country of the landingpage to use it on the xslt macro? Just store a cookie and try to read it with jquery? Or ist there something else which can be used for it?
Country Picker to show hide content
Hello,
I need the possibility to show some content/images only for specific countries. Now it would be great to have a Country picker in the way the multinode picker does work.
So i think i need to add a datatype called "CountryList" which includes all countries.
For each content i should be able to select the country the images/content should be shown. This must be also a multipicker.
For selecting the country i think i would try to use an IP locator or the user has to select it on a landingpage
Anybody any idea how i can get this working?
there is a country picker datatype in uComponents it is also multi select if you want
Regards
Ismail
Hi dominik,
I think what you'll have to do is create nodes for all your Countries and use MultiNodeTreePicker to select them.
For example, create a doctype called CountryList and a doctype called Country (Name, Code, etc...). Then create the CountryList, probably somewhere outside of your site's content node (I usually create a "Backoffice" node at level 1). Then add your Countries underneath.
You can then create a MultiNodePicker datatype and set the start node to the CountryList and add it to your doctype.
This might not be ideal and might be tedious if there's a lot of possible countries, but it's the best way I can think of without doing any custom datatype development. There is a Country Picker already in uComponents but it only supports a single selection.
Hope this helps,
Tom
Scratch that, didn't realize the Country Picker supported multiple selections. Thanks Ismail
Yes i think the countryPicker is a good solution for it.
One question about it:
I saw the values are for example "France" but how can i set this to the ISO country code. Is this possible?
What is the best solution to store the selected country of the landingpage to use it on the xslt macro? Just store a cookie and try to read it with jquery? Or ist there something else which can be used for it?
Thanks
is working on a reply...