0
我有一個模板句柄與PHP評論。我不希望html結果包含這些註釋php,並且我不能使用像{{! }}。渲染模板和數組與句柄
$模板:
<?php
/**
* Template to show the Section on the front end.
*
* @uses array $options A collection
* @uses string $options['section_additional_classes'] A list of additional
*
* @uses array $dropzones A collection of widget dropzones.
* @uses string $dropzones['A'] A first dropzone.
*
* @package admin-panel
*/
?>
<script data-widget-template="frontend-section" type="text/x-handlebars-template">
<div class="row-fluid {{ options.section_additional_classes }}">
<div class="span12">
{{& dropzones.A }}
</div>
</div>
</script>
我的代碼渲染車把(例如):使用PHP評論返回HTML之前
$hdlbars = new Handlebars_Engine();
$array_content_to_replace = array('dropzones' => array('A' => '<strong> Hello World!!</strong>'), 'options' => ('section_additional_classes') => 'class-example');
echo $hdlbars->render($template, array_content_to_replace);
的例子。