I have a template consisting of a checkbox and a value retrieve from php.
How can I compare the php value with the value of {{filename}}? It the two value matched, then set the checkbox to checked.
<script type="text/template" id="imageTemplate">
<div class="row gc_photo" id="gc_photo_{{id}}" style=" border-bottom:1px solid #ddd; padding-bottom:20px; margin-bottom:20px;">
<div class="checkbox">
<label>
<input onclick="return set_parentimage(this);" type="radio" name="primary_image" id="{{id}}_{{filename}}" value="{{id}}" {{#primary}}checked="checked"{{/primary}}/> <?php echo lang('main_image');?>
</label>
</div>
</div>
</script>