How to create / insert latte template from string
Notice: This thread is very old.
- Member | 12
I need some help. I did some project in Nette 2.1.1 and back then I had some string containing latte helpers stored in variable. I wanted to put interpreted content of variable into control template, so I did this:
$this->template->variable = $this->createTemplate('Nette\Templating\Template')->setSource($stringWith-Helpers);
In Nette 2.2.2 is Nette\Templating\Template Depricated and setSource method missing. How can I put string containing helpers into template now? I tried to find solution in Latte documentation, but it seems to be outdated.