The Geolocation module will add localized content to a site with these steps:
- Capture the IP address of the user.
- Use an API like ipinfodb.com to convert this into the name of the city and state where the user is.
- Use the name of the city and state to search the content database for articles containing the city's name.
- Create a block listing these articles.
- Load this block into a page with an AJAX call to make the page load faster.
The first three steps will be done with a model object and the second two will be handled by Freemarker templates.
Page: Geolocation module
Page: Geolocation module instructions