Open jellygnite opened 4 years ago
You can use seoContentFields by casting the result of getElementsForSearch in ElementalPageExtension as Text in your Page class
private static $casting = [
'ElementalContent' => 'Text'
];
public function getElementalContent()
{
return $this->hasExtension(ElementalPageExtension::class) ? $this->getElementsForSearch() : '';
}
public function seoContentFields()
{
return [
'Content',
'ElementalContent'
];
}
I noticed that the analysis in PageHealthExtension didn't take into account any Elemental blocks. I couldn't see how you would use the seoContentFields configuration so I tried rendering with the current theme.