[Help] Best approach for a Location collection #12625
Unanswered
rafaell-lycan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi y'all,
I'm building a real estate app (Spanish market) using PayloadCMS as my core, and I'm always trying to make small improvements across my collections and their relationship types.
Users don't have access to PayloadCMS, it's meant to be used as an admin/backoffice only 👌
I'm having a hard time deciding "how to" create a Location collection efficiently.
This collection will replace the following:
State
,City
andRegion
collections.Each property has these properties already, but it doesn't feel efficient atm:
The
region
property was previously related to a collection as well, but because I haven't managed (yet) how to only show cities or regions related to their parent scopes (state and city), I decided to leave the user enter as a string for now (which isn't ideal).Because of the nature of the app, I'm trying to figure out the best way to manage locations on the platform, either using composable collections.
Also, all the locations are specific instead of listing all states/provinces and cities of a country.
I don't have all the Spanish cities listed, only a few (The same applies to the neighborhoods):
Current cities filters:
On the app, when a user adds a property with a value
other
for the city, the idea would also be to provide an additional field where they can manually input their city.Yes, I already considered using Google Places API for it.
What should I do here to help me in both the back-office (PayloadCMS), and also when searching?
Beta Was this translation helpful? Give feedback.
All reactions