Skip to main content
Notice removed Authoritative reference needed by Patrick Kenny
Bounty Ended with Brandon Bearden's answer chosen by Patrick Kenny
Tweeted twitter.com/#!/StackDrupal/status/212357392011239425
Notice added Authoritative reference needed by Patrick Kenny
Bounty Started worth 50 reputation by Patrick Kenny

Views contextual filters- alter Alter the results returned by "Display a summary" for the Addressfield module

When I set contextual filters in Viewsa view for Content: my field: country and Content: my field: administrative area (state/province) and select Display a summary"Display a summary" for When the filter value is not available"When the filter value is not available", it returns a list of country/administrative area codes ("JP"e.g. "JP"), not the names of the country/administrative area ("Japan"e.g. "Japan"). How

How can I show the names of the countries/administrative areas instead of the codes?

Views contextual filters- alter the results returned by "Display a summary" for the Addressfield module

When I set contextual filters in Views for Content: my field: country and Content: my field: administrative area (state/province) and select Display a summary for When the filter value is not available, it returns a list of country/administrative area codes ("JP"), not the names of the country/administrative area ("Japan"). How can I show the names of the countries/administrative areas instead of the codes?

Alter the results returned by "Display a summary" for the Addressfield module

When I set contextual filters in a view for Content: my field: country and Content: my field: administrative area (state/province) and select "Display a summary" for "When the filter value is not available", it returns a list of country/administrative area codes (e.g. "JP"), not the names of the country/administrative area (e.g. "Japan").

How can I show the names of the countries/administrative areas instead of the codes?

vastly simplified the question and limited it to altering the views display a summary
Source Link
Patrick Kenny
  • 29.3k
  • 19
  • 139
  • 316

How can I make a "location directory" view (provided by default by Views contextual filters- alter the Location module) usingresults returned by "Display a summary" for the Addressfield module?

I'm trying to make a view similar to theWhen I set contextual filters in Views for Location directoryContent: my field: country viewand Content: my field: administrative area (provided by default with the Location modulestate/province), but using the Addressfield module instead.

However, when I display a summary using a contextual filter on an addressfield field and select Display a summary for When the filter value is not available, it returns a list of country/administrative area codes ("JP"), not the namenames of the country/administrative area ("Japan"). How can I show the name of the country instead of the country code?

BACKGROUND

After seeing this announcement that one of the location maintainers will no longer be working on the D7 version, I have decided to migrate from Location to the Addressfield/Geofield/Geocoder family of modules.

In the current version of my site, which uses the Location module, I make extensive usenames of the Location directory view, which by default shows a list of all countries for which there is at least one node with that location. Then, if one clicks on the countries, one sees a list of states/provinces for which there is at least one node with that location. Then, if one clicks a state/province, one gets a list of cities within that state/province. Finally, if one clicks the city, one gets a list of nodes with locations in that city.

I tried to implement this using the field provided by the Addressfield module. To do so, I configured the contextual filters in the same way as the Location directory view is configured. This works, but I'm getting the country codeadministrative areas instead of the name of the country.codes?

How can I make a "location directory" view (provided by default by the Location module) using the Addressfield module?

I'm trying to make a view similar to the Location directory view (provided by default with the Location module), but using the Addressfield module instead.

However, when I display a summary using a contextual filter on an addressfield field, it returns a list of country codes ("JP"), not the name of the country ("Japan"). How can I show the name of the country instead of the country code?

BACKGROUND

After seeing this announcement that one of the location maintainers will no longer be working on the D7 version, I have decided to migrate from Location to the Addressfield/Geofield/Geocoder family of modules.

In the current version of my site, which uses the Location module, I make extensive use of the Location directory view, which by default shows a list of all countries for which there is at least one node with that location. Then, if one clicks on the countries, one sees a list of states/provinces for which there is at least one node with that location. Then, if one clicks a state/province, one gets a list of cities within that state/province. Finally, if one clicks the city, one gets a list of nodes with locations in that city.

I tried to implement this using the field provided by the Addressfield module. To do so, I configured the contextual filters in the same way as the Location directory view is configured. This works, but I'm getting the country code instead of the name of the country.

Views contextual filters- alter the results returned by "Display a summary" for the Addressfield module

When I set contextual filters in Views for Content: my field: country and Content: my field: administrative area (state/province) and select Display a summary for When the filter value is not available, it returns a list of country/administrative area codes ("JP"), not the names of the country/administrative area ("Japan"). How can I show the names of the countries/administrative areas instead of the codes?

Source Link
Patrick Kenny
  • 29.3k
  • 19
  • 139
  • 316
Loading