forked from umakantp/jsmart
-
Notifications
You must be signed in to change notification settings - Fork 2
Left and right delimiter
pfaciana edited this page Sep 25, 2019
·
2 revisions
You can change default delimiters { and } assigning Latte.prototype.ldelim and Latte.prototype.rdelim
<script>
Latte.prototype.ldelim = '<!--{';
Latte.prototype.rdelim = '}-->';
var tpl = new Latte('{$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 Latte.prototype.auto_literal