Skip to content

Commit

Permalink
generate sitemap.xml per siteAccess && inject the multilingual and mu…
Browse files Browse the repository at this point in the history
…ltinational site annotations tag.[code review]
  • Loading branch information
mohamed-larbi-jebari committed Jun 25, 2024
1 parent 7238354 commit 2b50789
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions components/SEOBundle/bundle/Controller/SitemapController.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,13 @@ public function injectImageTag($location, DOMDocument $sitemap, DOMElement $root
$displayImage = $this->getConfigResolver()->getParameter('display_images_in_sitemap', 'nova_ezseo');

if (true === $displayImage) {
$content = $this->getRepository()->getContentService()->loadContentByContentInfo(
$location->contentInfo
);
try {
$content = $this->getRepository()->getContentService()->loadContentByContentInfo(
$location->contentInfo
);
} catch (Throwable $exception) {
return;
}
foreach ($content->getFields() as $field) {
$fieldTypeIdentifier = $content->getContentType()->getFieldDefinition(
$field->fieldDefIdentifier
Expand Down

0 comments on commit 2b50789

Please sign in to comment.