mirror of
https://github.com/getgrav/grav.git
synced 2026-02-10 08:37:43 +01:00
If no parent is set and I call a siblings collection, return a new collection
Fix for a plugins combination issue detailed in https://github.com/getgrav/grav-plugin-sitemap/issues/22
This commit is contained in:
@@ -2337,6 +2337,9 @@ class Page
|
||||
$results = $collection->addPage($this->parent());
|
||||
break;
|
||||
case 'siblings':
|
||||
if (!$this->parent()) {
|
||||
return new Collection();
|
||||
}
|
||||
$results = $this->parent()->children()->remove($this->path());
|
||||
break;
|
||||
case 'descendants':
|
||||
|
||||
Reference in New Issue
Block a user