mirror of
https://github.com/wilr/silverstripe-googlesitemaps.git
synced 2024-10-22 11:05:48 +02:00
Merge pull request #181 from evanshunt/main
This commit is contained in:
commit
6adb11b5bf
@ -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