-
Notifications
You must be signed in to change notification settings - Fork 35
Left and right delimiter
Umakant Patil edited this page Oct 13, 2017
·
1 revision
You can change default delimiters { and } assigning jSmart.prototype.ldelim and jSmart.prototype.rdelim
<script>
jSmart.prototype.ldelim = '<!--{';
jSmart.prototype.rdelim = '}-->';
var tpl = new jSmart('{$foo}:<!--{$foo}-->', {ldelim: '<!--{', rdelim: '}-->'}); //Or they can be passed locally and they would override delimiters passed by prototype.
tpl.fetch({foo:'bar'}); //will return '{$foo}:bar'
script>
see also Escaping Smarty Parsing in PHP Smarty documentation and jSmart.prototype.auto_literal