-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request #158
Comments
My suggestion would be to change your server-side templateOptions to evaluate on a different set of handlebars (ie: I think this would help a lot for someone coming in behind you who is trying to figure out why their server-side variable isn't being evaluated. Another solution would be to not pass your client-side templates through doT on the server. I realize some people use doT to render their view entirely, so that might not be an option for you, but I think it's a valid solution. I recommend the first option because it doesn't force you to change your workflow quite as much. |
Actually, all you need to do is set some boolean value like "isServer" and then wrap the sections you need for the server with [[? it.isServer]] ... [[?]] and wrap the sections you need for the client with [[? !it.isServer ]] ... [[?]] |
feel free to reopen #191 due to maintain issues with this fork |
@signumcode I think it is answered by @btpoe. Please reopen/clarify otherwise. |
Can be added to doT 101 #205 |
Hello, I am trying to use the same template on client and server side, and because of that I want to add some feature to template parser. I want to escape some template to be parsing.
E.x
<script type="text/plain" id="commentTremplate">
<span>it.comment.author</span> this part will be parsed on server side
[[ //this part will not be parsed on server side
........
<div>
it.comment.content
<div>
........
]]//
<script>
than I can add some trigger like parse only inside or outside of [[ ]],
The text was updated successfully, but these errors were encountered: