For a multisite application, each URL in a sitemap must identify the site it is associated with. The same product can have multiple URLs if it is available on multiple sites.
StaticSitemapGenerator
and DynamicSitemapGenerator
components invoke the getSites()
method of the SitemapGeneratorService
to determine the sites to generate URLs for. To configure the SitemapGeneratorService
so it can obtain this information, set the following properties:
Property | Description |
---|---|
| The site URL manager component. This should be set to |
| The site context manager component. This should be set to |
| If |
| If |
Note that if activeSitesOnly
is set to true
, enabledSitesOnly
is ignored, because an active site is always enabled, but an enabled site may not be active. If both activeSitesOnly
and enabledSitesOnly
are set to false
, then URLs are generated for all sites.