nystudio107 / craft-seomatic

SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
https://nystudio107.com/plugins/seomatic
Other
166 stars 71 forks source link

Custom Sitemaps Names / URLs #1506

Closed jamesevans1808 closed 2 months ago

jamesevans1808 commented 2 months ago

Question

I am using the SItemapCustomTemplate event to register custom sitemaps, but I want to have multiple that are named in a certain way. Is there a way of setting the route to the custom sitemap outside of the default sitemaps-1-global-custom-1-sitemap.xml?

The use case is a database table is being populated and refreshed daily via an API, but not stored in the CMS. I am then using a query to get page urls from this table, but it is nearing the row limit for a sitemap, which fro what I've seen, is 50,000 rows.

If this is not do-able, is there a way of paginating these custom sitemaps?

Thanks

khalwat commented 2 months ago

You should be able to use RegisterSitemapsEvent -> https://nystudio107.com/docs/seomatic/advanced.html#registersitemapsevent

Then you can have as many custom sitemaps as you want, and name them whatever you want.