Yet another way was to change the IncludeOptions of the request.
But all those require JSPs. In Sightly it’s a bit different. The way you avoid extra divs is using “unwrap”
From the Sightly Doc:
UNWRAP
“data-sly-unwrap": Removes the host element from the generated markup while retaining its content. This allows the exclusion of elements that are required as part of Sightly presentation logic but are not desired in the actual output.
However, this statement should be used sparingly. In general, it is better to keep the Sightly markup as close as possible to the intended output markup. In other words, when adding Sightly block statements, try as much as possible to simply annotate the existing HTML, without introducing new elements.”
“data-sly-unwrap": Removes the host element from the generated markup while retaining its content. This allows the exclusion of elements that are required as part of Sightly presentation logic but are not desired in the actual output.
However, this statement should be used sparingly. In general, it is better to keep the Sightly markup as close as possible to the intended output markup. In other words, when adding Sightly block statements, try as much as possible to simply annotate the existing HTML, without introducing new elements.”
No comments:
Post a Comment
If you have any doubts or questions, please let us know.