Skip to content

Commit

Permalink
Merge pull request #32 from nyeholt/master
Browse files Browse the repository at this point in the history
FIX Ignore content generation Requirements calls
  • Loading branch information
wilr committed May 30, 2016
2 parents 7c2267e + 6e7f760 commit c4a865a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions code/extensions/ElementPageExtension.php
Expand Up @@ -138,6 +138,7 @@ public function onBeforeWrite()
// Copy widgets content to Content to enable search
$searchableContent = array();

Requirements::clear();
foreach ($elements->Elements() as $element) {
if ($element->config()->exclude_from_content) {
continue;
Expand All @@ -151,6 +152,7 @@ public function onBeforeWrite()
array_push($searchableContent, $controller->WidgetHolder());
}
}
Requirements::restore();

$this->owner->Content = trim(implode(' ', $searchableContent));
}
Expand Down

0 comments on commit c4a865a

Please sign in to comment.