mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
Update GoogleSitemapSiteTreeExtension.php
This commit is contained in:
parent
7326028c7c
commit
8d321bd0a1
@ -135,6 +135,10 @@ class GoogleSitemapSiteTreeExtension extends GoogleSitemapExtension
|
|||||||
$cachedImages = [];
|
$cachedImages = [];
|
||||||
|
|
||||||
foreach ($this->owner->hasOne() as $field => $type) {
|
foreach ($this->owner->hasOne() as $field => $type) {
|
||||||
|
if (strpos($type, '.') !== false) {
|
||||||
|
$type = explode('.', $type)[0];
|
||||||
|
}
|
||||||
|
|
||||||
if (singleton($type) instanceof Image) {
|
if (singleton($type) instanceof Image) {
|
||||||
$image = $this->owner->getComponent($field);
|
$image = $this->owner->getComponent($field);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user