return templateCompiler.compile(page.pageClass(), template);
}
public Renderable compile(Class<?> templateClass) {
Template template = load(templateClass, null);
TemplateCompiler templateCompiler = templateSystem.compilerFor(template.getName());
//
// This is how the old mechanism worked, for example if dynamic.js comes through the system we still pass back
// the html compiler. JVZ: not sure why this wouldn't be directly routed to the right resource. TODO: investigate
//
if (templateCompiler == null) {
templateCompiler = templateSystem.compilerFor("html");
}
return templateCompiler.compile(templateClass, template);
}