I'm having a troublesome with thymeleaf, accordingly to this documentation thymeleaf I'm able to render just a part of my html page, using a fragment, I tried to use it with the controller code
@RequestMapping("/showContentPart")
public String showContentPart() {
...
return "index :: content";
}
and in HTML
<div id="content">
Only this will be rendered!!
</div>
However what I want is that a user click on a link on a nav bar and the div should render and the layout should stay static, in other words.. I want to maintain my layout and change the div content, however when I click for the link I get just get the content without my layout, I'm doing somehting wrong?