Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template engine adds more then <th:object> ... </th:object> #212

Open
rarapost opened this issue Mar 22, 2019 · 0 comments
Open

Template engine adds more then <th:object> ... </th:object> #212

rarapost opened this issue Mar 22, 2019 · 0 comments

Comments

@rarapost
Copy link

rarapost commented Mar 22, 2019

I have tried to use <th:block th:fragment="..."> to replace part of HTML content in templates.
I have multiple fragments in single "layout" file that.

It seems to work, but in case sequence <th:block th:fragment="..."> in the direct order (e.g. without any other "wrapper" elements), the rest of "layout" file is added ad a fragment content (not only code between <> and </> tags, but also following HTML elements that are placed after requested element)

The workaround is to enclose codem that I want use as a part of the template, to anothed (unnecessary) HTML tagd. Any tag works, including th:block.

I am adding simple spring boot application, where you can verify the behavior:
template-test.zip.

In the app, pages "/status1" and "/status2" behave incorrectly, pages "/status3" and "/status4" have added "wrapper" elements to the layout (files "layoutX.html") and behave correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant