This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

gk31098
gk31098

Hello, Could someone please tell me how to parse twig from string in plugin? Best regards.

bpettis
bpettis

Could you post your code because there are numerous ways to fix this kind of issue.

Eoler
Eoler

gk31098 said: Could someone please tell me how to parse twig from string in plugin?

Something like this:

$vars = [ 'var1' => 'val1', ... 'varN' => 'valN'];
return \Twig::parse($strTwigPart, $vars);

1-3 of 3

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.