On Friday 23 January 2015 15:42:46 Gabriel Walt wrote: > Hi, > > Isn't it possible to have some form of configuration that allows to > register scripting languages based on paths when needed? > > E.g. by default we could following config: > *.jsp => JSP engine > *.html => Thymeleaf engine > > And then by path we could override: > *.html in /foo => Sightly engine > > It would be great if only the default values would be global, and one can > apply something like mixin to the /foo path to make everything below it to > use Sightly instead of Thymeleaf. > > I doubt that many projects will mix different HTML template languages to a > point where we need to control it on a file level. The reason I'd like to > avoid this is that it would make it a pain when serializing/synchronizing > the repository content to a file system, as it would create an additional > folder structure for each file-level mixin or jcr:mimeType. This structure > would then have to be manually created for each newly created template > file... I have the impression that not allowing to mix different HTML > template languages within the same folder would be an acceptable > limitation.
+1 > I also would like to avoid to have a marker in the template to identify > the script engine to use, as it would mess with the HTML/XML validity, > having to read the 200 chars, which can be confusing if the marker doesn't > have to be (and sometimes really shouldn't be) on the first line. +1 I still think that configuring the paths patterns to select a script engine is the way to go. Regards, O. > > Best, > Gabriel