XML sitemap
EXT:thuecat provides one XML sitemap per detail record kind for the sitemap of XML sitemap: one for tourist attractions, one for trails.
On this page
Configuration
Depend on the typo3/ site set in your site set. It provides the sitemap page type and
serves the sitemap index at /sitemap. under each site's base; no static route is needed:
name: myvendor/my-set
label: 'My set'
dependencies:
- 'typo3/seo-sitemap'
Add one sitemap per kind. The provider takes the kind alone:
plugin.tx_seo.config.xmlSitemap.sitemaps {
attraction {
provider = WerkraumMedia\ThueCat\Frontend\Sitemap\DetailRecordSitemapDataProvider
config.kind = attraction
}
trail {
provider = WerkraumMedia\ThueCat\Frontend\Sitemap\DetailRecordSitemapDataProvider
config.kind = trail
}
}
What a sitemap lists
The provider takes the table, the detail page and the plugin argument from the kind and the current site:
- the records stored in the site's page tree, and no others;
- in a translated language, the translations, with URLs under that language's base, and no untranslated record;
- no hidden or deleted record;
- each record on the kind's detail page, the site setting
thuecat.orpois. pid_ show thuecat..trails. pid_ show
A kind whose detail page setting is 0 or unset gets an empty sitemap, and the sitemap index leaves it out.
With the route enhancers imported and the page role set on the detail pages, the URLs are the readable detail URLs, see Routing.
Updates
A record created, changed or deleted in the backend or by an import shows up on the next sitemap request; the sitemap does not wait for its cache period.