Thymeleaf: how to insert an include within another include?

0

I'm including a footer as follows in my home:

<div th:replace="footer :: footer"></div>

And within the footer I need to include some overlays:

    <div th:include="overlay-terminos-condiciones"></div>
    <div th:include="overlay-protecion-datos"></div>

But I try to call in the same way as the footer and does not work as expected, what is the correct way to call an include within the other? They are all in the same folder, both the footer.html and the .html of the overlays.

    
asked by anonymous 18.10.2017 / 15:32

1 answer

0

You could include two other fragments within the footer fragment and replace it with th:replace as done with footer itself. With th:include the fragment will be placed inside <div> and with replace <div> will be completely substituted by the content of the fragment. I hope I have helped.

    
12.04.2018 / 18:45