substituteby with object

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

substituteby with object

alfred
I used th:include and th:object and the given object was displayed correctly.
Now i replaced th:include with th:substituteby and the output is empty.

Is there another way to use an object with substituteby
Reply | Threaded
Open this post in threaded view
|

Re: substituteby with object

danielfernandez
Administrator
Hi,

That is intended behaviour, in fact.

th:include just includes inside the host tag (the one with the "th:include" attribute) the contents of the fragment (the contents of the tag holding the "th:fragment").

Nevertheless, "th:substituteby" completely substitutes the host tag by the fragment tag. On doing this, your "th:object" (which has less precedence and therefore executes after th:substituteby) is removed along with your tag, and so it never gets to be executed...

If you want to apply th:substituteby, you could just move your th:object to the fragment tag...

Regards,
Daniel.
Reply | Threaded
Open this post in threaded view
|

Re: substituteby with object

alfred
Okay make sense.
Thank you.