Skip to content

Instantly share code, notes, and snippets.

@vanWittlaer
Created February 4, 2020 16:31
Show Gist options
  • Save vanWittlaer/89dd99c94e3b4077e60b8b5f2a2c080f to your computer and use it in GitHub Desktop.
Save vanWittlaer/89dd99c94e3b4077e60b8b5f2a2c080f to your computer and use it in GitHub Desktop.
Controlling sitemap.xml output via config.php (since SW 5.5)
'sitemap' => [
'excluded_urls' => [
[
// Possible resources:
// - product (\Shopware\Models\Article\Article::class)
// - campaign (\Shopware\Models\Emotion\Emotion::class)
// - manufacturer (\Shopware\Models\Article\Supplier::class)
// - blog (\Shopware\Models\Blog\Blog::class)
// - category (\Shopware\Models\Category\Category::class)
// - static (\Shopware\Models\Site\Site::class)
'resource' => \Shopware\Models\Article\Article::class,
// The ID for the entity mentioned above (e.g. 5 excludes the URL for the product with ID 5).
// If left empty (or 0), the whole resource will be skipped for URL generation
'identifier' => '',
// The ID of the shop to which this exclusion applies. If left empty (or 0), this applies for every shop
'shopId' => 0
]
],
'custom_urls' => [
[
// The custom URL
'url' => 'https://myCustomUrl.de',
// Date in format Y-m-d H:i:s
'lastMod' => '2019-01-01 00:00:00',
// How frequently the page is likely to change
// Possible values: always, hourly, daily, weekly, monthly, yearly, always
'changeFreq' => 'weekly',
// The priority of this URL relative to other URLs on your site
// Must be a value between 0 and 1
'priority' => 0.5,
// The ID for the shop to which this custom URL applies. If left empty (or 0), this applies for every shop
'shopId' => 2,
]
]
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment