Block tag not working in template
Posted: Tue Nov 18, 2014 6:18 am
Running version 1.11.10, I have (among others) a trivially defined block tag that works as expected when inserted into a content page.
When I try to put the simplest possible invocation of it into a layout template, the editor reports a compile error ending with "unexpected closing tag."
Is this an intended behavior, a known bug, or something I'm doing wrong or failing to grasp?
The invocation is {zz2Echo}abcde{/zz2Echo}, which normally outputs "(++ abcde ++)".
The function is:
in file block.zz2Echo.php in the plugins directory.
When I try to put the simplest possible invocation of it into a layout template, the editor reports a compile error ending with "unexpected closing tag."
Is this an intended behavior, a known bug, or something I'm doing wrong or failing to grasp?
The invocation is {zz2Echo}abcde{/zz2Echo}, which normally outputs "(++ abcde ++)".
The function is:
Code: Select all
<?php
function smarty_block_zz2Echo($params, $content, &$smarty, &$repeat)
{
if(!$repeat):
return "(++ $content ++)";
endif;
}
?>