I have a control loop in a template - it's used for looping through the pagination summary for a DataObject set. Its pretty simple and works in other contexts. However in this situation it breaks i.e.
The section of the template file looks like this:
<% control StemData.Comments.PaginationSummary(4) %>
<!-- Do Stuff Here -->
<% end_control %>
The template section it builds looks like this:
<% control StemData.Comments.PaginationSummary(4) %>
<!-- Do Stuff Here -->
SSVIEWER;
} ;
$val .= <<<SSVIEWER
However it should be converting it to something like this:
SSVIEWER;
array_push($itemStack, $item); if(($loop = $item->obj("StemData",null,true)->obj("Comments",null,true)) && ($loop = $loop->obj("PaginationSummary", array("4")))) foreach($loop as $key => $item) { ;
$val .= <<<SSVIEWER
<!-- Do Stuff Here -->
SSVIEWER;
} ;
$val .= <<<SSVIEWER
If I manually change it to what it should be and re-upload the cache template file the page loads fine - if I let it build it automatically it fails to make a functional template in the cache and I get:
<b>Parse error</b>: syntax error, unexpected '}' in ...
Any ideas - am I doing something wrong or is this a bug