Independent template usage not function Nette 2.0-rc1

Notice: This thread is very old.
milroe
Member | 7
+
0
-

My index.php is look:

<?php
require 'libs/Nette/loader.php';

use Nette\Templating\FileTemplate;


$template = new FileTemplate('hello.latte');
$template->hello = 'hello world';
$template->render();
?>

my template ‘hello.latte’ is look:

{$hello}

The result is:

{$hello}

so templating not function.

Tested on Nette Framework 2.0 Release Candidate (date January 23, 2012);

HosipLan
Moderator | 4668
+
0
-

You have to read the whole article https://latte.nette.org/en/#… first.

Because you've forgot to register the Latte Engine.

milroe
Member | 7
+
0
-

HosipLan wrote:

You have to read the whole article https://latte.nette.org/en/#… first.

Because you've forgot to register the Latte Engine.

Thank you,

so i thing that the information about registering filters should be above the registering helpers, for inattentive readers like me :), or shown in the example, because without this one expamle does not work.

bye.