Includeblock cannot use variable with string

Notice: This thread is very old.
Heiko
Member | 4
+
0
-

Hi.
I don't know, if it's bug or intention.

I have the code in template:

<?php
{includeblock $templateDir . '/template.latte'}
?>

Error is syntax error, unexpected ‘.’, expecting ‘)’

And code:

<?php
$_l->templates['2913931254']->renderChildTemplate($templateDir, array(. '/blocks.latte') + get_defined_vars())
?>

Last edited by Heiko (2014-08-26 14:42)

David Matějka
Moderator | 6445
+
0
-

I think it's a bug. Try this:

{includeblock $templateDir.'/template.latte'}
Heiko
Member | 4
+
0
-

I have tried this and I got same error.

David Matějka
Moderator | 6445
+
0
-

Weird, I have tried it and it works.
Did you really strip spaces around the dot?

Heiko
Member | 4
+
0
-

Sorry for mistake. It works.