Does Thymeleaf 3 support Tiles 2 somehow? There is a package that I was using for Thumeleaf 2.x.x thymeleaf-extras-tiles2-spring4 but as I see now it is not compatible because of changes in org.thymeleaf.dialect.AbstractDialect class
Caused by: java.lang.NoSuchMethodError: org.thymeleaf.dialect.AbstractDialect: method <init>()V not found
[INFO] at org.thymeleaf.extras.tiles2.dialect.TilesDialect.<init>(TilesDialect.java:46)
Do I need to wait for an update of this integration to be able to start with T3?
Is there any way that I can simulate Tiles in Thymeleaf3
I only use my Tiles for something like this:
<definition name="portal/**" template="layouts/portal">
<put-attribute name="_head" value="/portal/{1} :: _head"/>
<put-attribute name="content" value="/portal/{1} :: content"/>
</definition>
To solve that problem I have created a proxy for
SpringTemplateEngineand advisedTemplateEngine.process()method.How it works:
The code map layouts on the basis of template path for instance:
is mapped to layout
Additionally, it passes variable VIEW containing a path to actual template
Inside layouts it may be used to include specific fragments. Very simple portal layout may look like that:
Controller:
TemplateEngine: