Skip to content
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

Allow relational fields be declared in url patern recursively #146

Open
minht11 opened this issue Nov 19, 2023 · 3 comments
Open

Allow relational fields be declared in url patern recursively #146

minht11 opened this issue Nov 19, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@minht11
Copy link

minht11 commented Nov 19, 2023

Feature request

Allow relational fields be declared in url patern recursively, the same idea idea as in #86 (comment)

Summary

I have schema which looks more or less like this

    "slug": {
      "type": "string",
    },
    "children": {
      "type": "relation",
      "relation": "oneToMany",
      "target": "api::location.location",
      "mappedBy": "parent"
    },
    "parent": {
      "type": "relation",
      "relation": "manyToOne",
      "target": "api::location.location",
      "inversedBy": "children"
    }

can define sitemap url pattern one level /location/[parent.slug]/[slug], but if location is 3 levels deep then it doesn't work. I am not sure on exact syntax but very simplified it might look like this /location/[parent.parent.slug]/[parent.slug]/[slug], of course if nestness level is dynamic it wouldn't work very good.

Related issue(s)/PR(s)

#86

@boazpoolman
Copy link
Member

Agreed. Nested relations should be able to be added to the URL patterns.

@boazpoolman boazpoolman added the enhancement New feature or request label Nov 20, 2023
@radoslavzeman
Copy link

Hello @boazpoolman @minht11,

do you maybe have some plan to implement this feature? This would be very helpful and would unblock us from using this plugin.

Thank you!

@boazpoolman
Copy link
Member

Hi @radoslavzeman

Currently this is not a priority for us.

Should you be open to providing financial backing for the plugin, we can push this issue on our priority list.
For more information please contact us at info@pluginpal.io.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants