This can be a very useful module. I want to have a full fledge functionality on my website for which I guess location module is a good start. How I can use countries module with location module?

Any suggestions are welcome.

Comments

ugintl created an issue. See original summary.

Alan D.’s picture

They are completely independent of each other, but both may provide view relationship handlers to allow you to join these.

Otherwise, carefully plan out your path aliases and contextual filters and you should be able to indirectly get them working together ;)

Related tickets

#1904988: Integrate with Countries no response (marked your new ticket as a duplicate of this older one)

Not sure on the internals, but Countries module directly updates the core Drupal countries list. Location would hopefully limit itself to these? See #1068724: Use Drupal core list of countries and country codes and #2211497: hook_countries_alter breaks location

i.e. Enable countries and disable the USA. It should disappear from the list that Location uses.

Let us know how you go :)

ugintl’s picture

Thank you for your informative reply. My knowledge of drupal is beginner level. I am sure you understand where I am going.

Just to expand my question, I am looking for a solution which enables me to have Countries, cities, addresses, country flags and autocomplete. Like you see on other social networks. I am also planning to use ad module. I am very confused right now what to do and what to not.

Any better alternative you may suggest? Hope you understood.

ugintl’s picture

One thing I forgot is that my first priority is using a module. There are few tutorials which guide for adding countries list programmatically to location module, but I do not prefer it.

Alan D.’s picture

Status: Active » Fixed

So you can add Countries, ignore almost everything it provides bar the country lists and it should work

/admin/config/regional/countries

* disable core countries
* add new countries
* update the country names (I18N only so so if that matters)

That second issue ( #2211497 ) suggests that you should first configure your countries, then start adding real data with Locations.

Good luck

ugintl’s picture

Thank you again. I am really excited. I will definitely try it.

ugintl’s picture

I have a question you said,

/admin/config/regional/countries

* disable core countries

Do you mean I should disable all the countries names provided by the countries module? Why is that?

Alan D.’s picture

optionally disable the ones you do not want :)

i.e. nuke UK, but add England, Ireland, Scotland, etc

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.