pluginpal / strapi-plugin-sitemap

🔌 Generate a highly customizable sitemap XML in Strapi CMS
https://www.pluginpal.io/plugin/sitemap
MIT License
252 stars 53 forks source link

Allow relational fields be declared in url patern recursively #146

Open minht11 opened 1 year ago

minht11 commented 1 year ago

Feature request

Allow relational fields be declared in url patern recursively, the same idea idea as in https://github.com/boazpoolman/strapi-plugin-sitemap/issues/86#issuecomment-1192600845

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)

https://github.com/boazpoolman/strapi-plugin-sitemap/issues/86

boazpoolman commented 1 year ago

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

radoslavzeman commented 7 months ago

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 commented 7 months ago

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.