1

I have a channel containing entries with a custom country field that uses Reegion Select.

I need to output the entries in alphabetical order based on this field.

The problem is that Reegion Select stores the 2 character ISO country code for each country and maps it to the English name. So when you list the names alphabetically countries like Germany (DE) and Spain (ES) don't sit in the correct place in the list. I need a way to get the English name to use in the orderby parameter of my entries tag.

Reegion Select has a number of methods to get different versions of the country name/code out by using {field:alpha2} or {field:country} but this won't work in the entries tag parameter.

So, I'm looking for ideas on how to crack this one. Help!

0

Basically there is no way to do this without altering the countries array and probably breaking other areas of the add-on.

For my requirements I just changed my fieldtype to a standard select list and threw in a list of countries (generated from the array used in this add-on).

I'll add this isn't really a shortcoming of the add-on as in order to list them alphabetically (in English) the country names would need to be in the native language of that country (bearing in mind some countries have more than one official language). The requirement itself is fundamentally flawed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.