We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 19c71f1 commit 5602397Copy full SHA for 5602397
src/Extension/VirtualElementContentControllerExtension.php
@@ -3,6 +3,7 @@
3
namespace DNADesign\ElementalVirtual\Extensions;
4
5
use DNADesign\Elemental\Models\BaseElement;
6
+use SilverStripe\CMS\Model\RedirectorPageController;
7
use SilverStripe\Core\Extension;
8
9
class VirtualElementalContentControllerExtension extends Extension
@@ -28,6 +29,11 @@ public function handleElement()
28
29
if ($element && $element->canView()) {
30
$useElement = clone $element;
31
32
+ // Don't allow this to be used on a RedirectorPage
33
+ if ($this->owner instanceof RedirectorPageController) {
34
+ return null;
35
+ }
36
+
37
// modify the element to appear on the correct 'Page' so that
38
// any breadcrumbs and titles are correct.
39
$elementalAreaRelations = $this->owner->getElementalRelations();
0 commit comments