Notice: You are browsing the documentation for PrestaShop 9, which is currently in development.
You might want to read the documentation for the current version, PrestaShop 8. Read the current version of this page
Hook | actionModifyFrontendSitemap |
---|---|
Locations | FO |
Type | action |
Origin | core |
Aliases |
Origin | File |
---|---|
core | controllers/front/SitemapController.php |
Hook::exec(
'actionModifyFrontendSitemap',
['urls' => &$sitemapUrls],
null,
false,
true,
false,
null,
true
);
public function hookActionModifyFrontendSitemap($params)
{
$customUrls = [
[
'id' => 'custom-url-1',
'label' => 'Custom URL',
'url' => 'https://prestashop-project.org',
]
];
$params['urls']['pages']['links'] = array_merge($params['urls']['pages']['links'], $customUrls); // add custom urls to pages group
unset($params['urls']['categories']); // hide categories
}