Skip to content

Allow relational fields be declared in url patern recursivelyΒ #146

@minht11

Description

@minht11

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions