Location Results


I am planning on using Kirby for an upcoming project and was wondering if I could get some help figuring out this specific page I will need to build. It’s a searchable directory of store locations where the product is sold. The interaction I’d like i simple I want to have a tabbed listing for the areas and inside each there are posts including the information of the store.

The functionality I need on top of this is how to search the listings and display them like the screensghot shown (left is empty state / right is results state)

Any ideas on how to organize the page to add a high amount of results and make it searchable!?

Thanks in advance!!!


Bastian once wrote a little script to filter location entries based on a radius: https://gist.github.com/bastianallgeier/6dcd06f66e23f0d4e2a5

I guess you could get the location of the searched place through the Google Maps API and then filter all entries with that location and a fixed radius?

Thanks! And how would the items be added to a page - as subpages of a locations page that then I would loop through?

So after diving more into the code I realized that this could be done with Structure Fields! Looks very promising now I just need to figure out how to organize my content so that the loop can filter the field output to the specific state.

Having a great time with Kirby so far!