Handle cases such as 'Class.RelationName'
This commit is contained in:
parent
a333b56711
commit
67c8ad044e
|
@ -162,7 +162,11 @@ class GoogleSitemapSiteTreeExtension extends GoogleSitemapExtension
|
||||||
|
|
||||||
foreach ($this->owner->manyMany() as $field => $type) {
|
foreach ($this->owner->manyMany() as $field => $type) {
|
||||||
$image = false;
|
$image = false;
|
||||||
|
|
||||||
|
if (strpos($type, '.') !== false) {
|
||||||
|
$type = explode('.', $type)[0];
|
||||||
|
}
|
||||||
|
|
||||||
if (is_array($type) && isset($type['through'])) {
|
if (is_array($type) && isset($type['through'])) {
|
||||||
if (singleton($type['through']) instanceof Image) {
|
if (singleton($type['through']) instanceof Image) {
|
||||||
$image = true;
|
$image = true;
|
||||||
|
|
Loading…
Reference in New Issue