core.text_formatter_s9e_renderer_setup
. The most reliable way to use a parameter in a template would be this:Code: Select all
<xsl:value-of select="$MY_PARAM"/>
{MY_PARAM}
anywhere in the text as long as it doesn't collide with the name of a token like {TEXT}
or {L_WHATEVER}
.{MY_PARAM}
or <xsl:value-of select="$MY_PARAM"/>
in its template then use an extension to set its value at rendering time.Code: Select all
class listener implements EventSubscriberInterface
{
public static function getSubscribedEvents()
{
return ['core.text_formatter_s9e_renderer_setup' => 'onRendererSetup'];
}
public function onRendererSetup($event)
{
$event['renderer']->get_renderer()->setParameter('MY_PARAM', 'My param');
}
}