-
-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pattern: relations array #78
Comments
So I did come up with a more optimal way to solve this. This method should also open the door for greater customization and resolution of other niche cases: We could add a way where a custom "resolver" could be injected from the plugins config. I haven't implemented it yet, but it is a promising solution IMO. That way, user's can override the default resolution. We'd just pass in the relevant record and the user would be responsible for changing that into a path. We'd likely have to disable editing the content type in the admin if a custom resolver is being used, but other than that I believe it's a promising route. |
That does sound promising ! Just so we're on the same page. You mean you would write some plugin config to register for example So that we can then create a pattern like: Did I get that right? |
I'm trying to generate a new URL bundle as I have a relationship ManyToMany between posts and cities. Could you help me? |
Hi @candidosales. Thank you for your interest in this feature. Sadly *ToMany relations are not yet supported in URL patterns. |
Hi @boazpoolman , I'm working on it: #139 |
Feature request
Summary
As of #75 you can add relation fields to the URL pattern like so:
Though this only works for single relations. If the
relation
would be of target*ToMany
we wouldn't know which entity to query exactly.Suggested solution(s)
We should allow the pattern to be written like this to select a specific item of an array of relations.
Here we would select the second entity on the relations array.
The text was updated successfully, but these errors were encountered: