开发者

sitemesh layout

开发者 https://www.devze.com 2023-03-23 22:43 出处:网络
The Stripes web framework includes a layout engine which provides the following feature: Layout Definition File - layout.jsp

The Stripes web framework includes a layout engine which provides the following feature:

Layout Definition File - layout.jsp

<s:layout-definition>
  Header
  <div><s:layout-component name="body"/></div>
  Footer
</s:layout-definition>

Page Using layout.jsp

<s:layout-render name="/layout.jsp">
  <s:layout-component name="body">
    Hello, reusable layout
  </s:layout-component>
</s:layout-render>

Generated Content

Header
<div>Hello, reusable layout</div>
Footer

In the layout definition I specify the position of a component and the page defines the content of this component. I'm looking for an equivalent feature in Sitemesh, which I'm using in a Grails application.

It seems that Sitemesh will only only allow one to posititon (or decorate) the entire page body. Is there any开发者_StackOverflow way I can position more fine-grained content elements as above?


If you need more fine-grained content elements, take a look at Sitemesh Content Blocks

0

精彩评论

暂无评论...
验证码 换一张
取 消