How to change JsRender template tags (delimiters)?
See original GitHub issueI use Twig. It uses these tags: {{ name }}
I want to include JsRender in my project. But JsRender also uses the same tags {{:name}}
, so there is a conflict and nothing works. How to change default JsRender tags with custom tags, say Ruby-like <%= name %>
Question on Stackoverflow: http://stackoverflow.com/questions/29493005/how-to-change-jsrender-template-tags
Issue Analytics
- State:
- Created 8 years ago
- Comments:8 (6 by maintainers)
Top Results From Across the Web
Setting tag delimiters for JsRender
Sometimes there can be a need to use different delimiters. For example there may be a conflict if the template is being rendered...
Read more >How to change JsRender template tags? - Stack Overflow
JsRender let's you change the delimiters, like this: $.views.settings.delimiters("<%", "%>");. So then you would write <%: name %> .
Read more >EJS -- Embedded JavaScript templates
JavaScript code in simple, straightforward scriptlet tags. ... Custom delimiters can be applied on a per-template basis, or globally:.
Read more >Eta | Eta
Lighweight, powerful, pluggable embedded JS template engine. ... Eta doesn't break with delimiters inside strings and comments. Example: <%= "%>" %> works ...
Read more >ejs - npm
You'll likely want to use the raw output tag ( <%- ) with your ... Custom delimiters can be applied on a per-template...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
JsRender let’s you change the delimiters, like this:
So then you would write
<%: name %>
.If you use JsViews, you can also set the binding character
^
in{^{
- by writing:then using
<*%: name %>
.There is minimal documentation here: http://www.jsviews.com/#tagsyntax
More detail to come when I add docs for settings.delimiters, settings. debugMode() etc.