Giter Club home page Giter Club logo

Comments (5)

candidosales avatar candidosales commented on May 31, 2024 1

I'm trying to generate a new URL bundle as/post/[cities[0].slug]/[slug], but it isn't working.

I have a relationship ManyToMany between posts and cities.

Could you help me?

from strapi-plugin-sitemap.

kibblerz avatar kibblerz commented on May 31, 2024

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.

from strapi-plugin-sitemap.

boazpoolman avatar boazpoolman commented on May 31, 2024

That does sound promising !

Just so we're on the same page. You mean you would write some plugin config to register for example my-key. Which can be any value you assign to it.

So that we can then create a pattern like: /test/[id]/[my-key].

Did I get that right?

from strapi-plugin-sitemap.

boazpoolman avatar boazpoolman commented on May 31, 2024

Hi @candidosales.

Thank you for your interest in this feature.

Sadly *ToMany relations are not yet supported in URL patterns.
A couple of possible solutions have been suggested here by myself and kibblerz, though none have been implemented as of yet.
I'm afraid you'll have to be patient until I find time to work on this feature, or take a stab at it yourself.

from strapi-plugin-sitemap.

candidosales avatar candidosales commented on May 31, 2024

Hi @boazpoolman ,

I'm working on it: #139

from strapi-plugin-sitemap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.