I am new to JS and Handlebars templates. I have a nested JSON structure, often each parent node is a new object / has a different structure, so recursion is not the solution that I think.
My question is: Is it possible to call another template from a template in Handlebars?
My background XSLT
Example:
<script id="entry-template" type="text/x-handlebars-template"> <div>{{name}}</div> .. call template-2 </script> <script id="template-2" type="text/x-handlebars-template"> <div>{{name2}}</div> .. call template-3 </script> <script id="template-3" type="text/x-handlebars-template"> <div>{{name3}}</div> </script>
.. etc.
Anyone who has any tips?
Regards, Bob
source share