ExtendedSitemap
https://github.com/magesuite/extended-sitemap
This module offers the possibility to add additional links to the sitemap.
Â
Installation
This module is part of core metapackage
Â
Installation if metapackage is not used:
composer require "creativestyle/magesuite-extended-sitemap" ^1.0.0
Admin settings
Admin setting can be adjusted in Store -> Configuration -> Advanced -> Extended sitemap
Â
Settings:
Name | Value | Comment |
---|---|---|
Additional Links enabled | Yes/No |  |
Additional links | Â | Path have to be without domain, for example for "site.com/contact" correct value is "/contact" |
Â
Backend
Backend documentation is in progress.
Â
While creating sitemap, there can be added additional links
vendor/magento/module-sitemap/Model/ItemProvider/Composite.php:31
class Composite implements ItemProviderInterface
{
public function getItems($storeId)
{
$items = [];
foreach ($this->itemProviders as $resolver) {
foreach ($resolver->getItems($storeId) as $item) {
$items[] = $item;
}
}
return $items;
}
}
Â
Additional links, if enabled, are taken from configuration
vendor/creativestyle/magesuite-extended-sitemap/Model/ItemProvider/AdditionalLinks.php:26
class AdditionalLinks implements \Magento\Sitemap\Model\ItemProvider\ItemProviderInterface
{
public function getItems($storeId): array
{
if (!$this->configuration->isEnabled($storeId)) {
return [];
}
$items = [];
$additionalLinks = $this->configuration->getAdditionalLinks($storeId);
foreach ($additionalLinks as $additionalLink) {
$items[] = $this->itemFactory->create([
'url' => $additionalLink['path'],
'priority' => $additionalLink['priority'],
'changeFrequency' => $additionalLink['changeFrequency'],
]);
}
return $items;
}
}
Â
vendor/creativestyle/magesuite-extended-sitemap/Helper/Configuration.php:29
Â
Frontend
There are no frontend functionalities in this module.
Â
Â
Â