Possible to use a layout page?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Possible to use a layout page?

Hans Bogenmacher
Hi All,

I want to create a spring website using thymeleaf, but I can't find a way to using layout page.

As I designed, my website will have three layouts, let's name them LA LB LC. Every page will use one and only one layout. I want to use the layout as the following format:

Include layout "LA".

Replace "main" with blah blah...

Replace "footer" with blah blah blah...

And in another page, it will be like:

Include layout "LB".

Replace "main" with something...

Replace "footer" with something something...

So far as I learned, I must split the layouts to fragments, and include the fragments in the page. Maybe this function exists but I don't know how. Then please teach me.

Best regards & Thanks a lot,
Hans
Reply | Threaded
Open this post in threaded view
|

Re: Possible to use a layout page?

yvanavermaet
Hi Hans

I believe you are looking for this: https://github.com/ultraq/thymeleaf-layout-dialect

Kind regards,
Yannick