valantic-spryker / category-sitemap-connector
Extends Sitemap module with category urls
1.0.0
2024-02-21 10:28 UTC
Requires
- php: >=7.4
- valantic-spryker/sitemap: ^4.0.4
Requires (Dev)
This package is auto-updated.
Last update: 2025-01-03 16:17:47 UTC
README
Description
This module is used alongside valantic-spryker/sitemap
Sitemap module to extend the sitemap with category URLs.
Usage
composer require valantic-spryker/category-sitemap-connector
- Since this is under ValanticSpryker namespace, make sure that in
config_default
:$config[KernelConstants::CORE_NAMESPACES]
has the namespace$config[KernelConstants::PROJECT_NAMESPACES]
has the namespace
- Add
CategorySitemapCreatorPlugin
to\ValanticSpryker\Zed\Sitemap\SitemapDependencyProvider::getSitemapCreatorPluginStack
- Add
\ValanticSpryker\Shared\CategorySitemapConnector\CategorySitemapConnectorConstants::RESOURCE_TYPE
to\ValanticSpryker\Yves\Sitemap\SitemapDependencyProvider::getAvailableSitemapRouteResources
- Now the Sitemap will include published URLs of categories.
Testing
Tests do not work without Spryker environment, since Spryker helpers are used. To run tests, execute following command in root Spryker directory:
codecept run -c vendor/valantic-spryker/category-sitemap-connector/tests/ValanticSprykerTest/Zed/CategorySitemapConnector