You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to use the following structure but it doesn't work.
test.html
<th:blocklayout:fragment="a"><divlayout:include="test::b"><divlayout:fragment="b-content"><th:blocklayout:fragment="a-content"/><!-- doesn't work --></div></div><th:blocklayout:fragment="a-content"/><!-- works --></th:block><th:blocklayout:fragment="b"><th:blocklayout:fragment="b-content"/></th:block>
It seems to me that the nested fragment reference 'a-content' can't be interpreted as such. Instead it it interpreted as setting a 'a-content' fragment parameter for fragment b. This is caused by the ambiguity of the 'layout:fragment' attribute which serves for both purposes.
Instead another 'layout:fragmentref' attribute could help but this would ruin all existing scripts.
The text was updated successfully, but these errors were encountered:
I think I found a solution.
AbstractContentProcessor.findFragments:85 proceeds to recurse even if a fragmentname has been found, which IMHO does not make sense. Recursing should only be done when fragmentname is null which can be achieved by adding an else branch to the first if statement:
I wanted to use the following structure but it doesn't work.
test.html
template.html
It seems to me that the nested fragment reference 'a-content' can't be interpreted as such. Instead it it interpreted as setting a 'a-content' fragment parameter for fragment b. This is caused by the ambiguity of the 'layout:fragment' attribute which serves for both purposes.
Instead another 'layout:fragmentref' attribute could help but this would ruin all existing scripts.
The text was updated successfully, but these errors were encountered: