Using jTemplates, it is possible to composite templates like so...
<textarea id="templateList" class="template"><!--
{#template RESULTS}
This a template for generating a list of results
{#include PAGINATION root=$T}
{#/template RESULTS}
{#template PAGINATION}
This is a template for generating pagination through the results
{#/template PAGINATION}
--></textarea>
However there are times when it would be handy to be be able to composite completely different templates. For example, I have a lot of different types of lists, each of which has a distinct template. Using the method above, I am forced to keep repeating the same chunk of code for pagination over and over in each of my templates for different lists.
I would much rather do something like the following...
<textarea id="templateList" class="template"><!--
This is a template listing results
{#some kind of call to templatePagination}
--></textarea>
<textarea id="templatePagination" class="template"><!--
This is a template for generating pagination
--></textarea>
Does anyone know if such a thing is possible and, if so, how to go about it?
Thanks!