latte html variable print string
- Šaman
- Member | 2659
Kcko wrote:
use noescape filter. Btw tvoje anglictina je fakt něco, původně jsem myslel, že se jedná o vtip.
IMO he is not understand czech.
Last edited by Šaman (2018-12-17 00:57)
- hsynucak
- Member | 8
Šaman wrote:
Kcko wrote:
use noescape filter. Btw tvoje anglictina je fakt něco, původně jsem myslel, že se jedná o vtip.
IMO he is not understand czech.
thank you. working this code. :)
- japlavaren
- Member | 404
if you need to pass variable with html code to template with html code, you can use ` Nette\Utils\Html`
$this->template->variable = Nette\Utils\Html::el()->sendHtml("<b>bolder text</b>");
this works also with nette forms captions and others ;)
- duke
- Member | 650
japlavaren wrote:
if you need to pass variable with html code to template with html code, you can use ` Nette\Utils\Html`
$this->template->variable = Nette\Utils\Html::el()->sendHtml("<b>bolder text</b>");
this works also with nette forms captions and others ;)
Not sendHtml
but setHtml
:
$this->template->variable = Nette\Utils\Html::el()->setHtml("<b>bolder text</b>");
It is also possible to use addHtml
(or even addText
in this case) if you create the b
element first like this:
$this->template->variable = Nette\Utils\Html::el('b')->addHtml("bolder text");
Last edited by duke (2019-08-12 21:14)