Kendo UI Docs contains an article "How To: Load Templates from External Files", where authors review two way of dealing with Kendo UI templates.
While using Kendo UI we have found our own answer to: where will the Kendo UI templates be defined and maintained?
In our .NET project we have decided to keep templates separately, and to store them under the "templates" folder. Those templates are in fact include html, head, and stylesheet links. This is to help us to present those tempates in the design view.
In our scripts folder, we have defined a small text transformation template: "templates.tt", which produces "templates.js" file. This template takes body contents of each "*.tmpl.html" file from "templates" folder and builds string of the form:
document.write('<script id="footer-template" type="text/x-kendo-template">...</script><script id="row-template" type="text/x-kendo-template">...</script>');
In our page that uses templates, we include "templates.js":
<!DOCTYPE html> <html> <head> <script src="scripts/templates.js"></script> ...
Thus, we have:
WebTemplates.zip contains a web project demonstrating our technique. "templates.tt" is text template transformation used in the project.
See also: Compile KendoUI templates.