Comments (5)
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.
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.
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.
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.
Hi @boazpoolman ,
I'm working on it: #139
from strapi-plugin-sitemap.
Related Issues (20)
- how to exclude a specific url for sitemap HOT 9
- Allow URL translation sets for custom URLs HOT 2
- How to combine multiple content-types? HOT 2
- Server.js configuration for the sitemap plugin HOT 12
- Error when generating sitemap on Strapi 4.14.4 and Node v18 HOT 2
- Multiple hostnames/host profiles HOT 1
- Critical dependency: the request of a dependency is an expression HOT 5
- Allow relational fields be declared in url patern recursively HOT 3
- Bug: excludedTypes config setting doesn't seem to work HOT 5
- Bug: missing settings labels HOT 5
- Make the <xhtml:link> element in XML optional HOT 1
- feature request: pretty print option HOT 6
- Feature Request: i18n `prefix_except_default` strategy HOT 8
- Sitemap Breaks When Exceeding Limit and Strapi Port Differs from Default HOT 4
- Add an additional link tag with hreflang x-default to improve locale detection fallback HOT 5
- Does not work with ADMIN_PATH and STRAPI_ADMIN_BACKEND_URL HOT 1
- Add extension points / hooks. HOT 1
- [FEAT] Ignore all content types but the created by content type builder, i.e., api content types
- Error building SitemapStream in Strapi Sitemap Plugin after removing locale
- [FEAT] Wildcard for language in multilanguage sitemap patterns
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from strapi-plugin-sitemap.