thezenmonkey thezenmonkey - 8 months ago 14
PHP Question

Render Arbitrary HTML in custom summary_field

I'm trying to render HTML in a Gridfield using a custom Summary Field in SS3.3 the older technique no longer works.

Answer

Have you tried casting like this?

$config->getComponentByType('GridFieldDataColumns')
    ->setFieldCasting(array('MyField' => 'HTMLText->forTemplate'));