Magnolia Community
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.
| Related pages |
|---|
|
Page: Geolocation module
|
|
Page: Geolocation module instructions
|
Labels
4 Comments
Hide/Show CommentsJun 13, 2012
Samuel Schmitt
If I understand well, you want to create a component/paragraph that aggregates content based on the location information of the user.
possibilities.
Do you want to trigger a search that looks for content containing "the city" and "the state" or is it something more advanced?
Thanks to detail a bit more
Jun 13, 2012
Peter Wayner
Jun 13, 2012
Matt Dertinger
Hi,
Samuel mentioned on the Geolocation Tutorial Page using a geolocation API and HTML5 data storage for mobile templating within the STK. On the client-side the STK already includes Webshims lib that provides polyfills for geolocation as well as storage and JSON. I think these could come in handy with the integration. Thoughts?
Cheers,
Matt
Jun 14, 2012
Samuel Schmitt
Peter,
extendsmechanism that let you re-use features from STK and change it regarding your needs.It will mean also that this module requires that STK is installed and also the components will be only working in a "STK-based" website.
And finally as said Matt, STK comes with a set of JS scrips files that will be useful in this case, again another reason to extend (or to be dependent) on STK.