Using freemarker layout vs tiles.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Using freemarker layout vs tiles.

Praveen Kumar
Hi All.

Freemarker layout example.

Example from (http://richardbarabe.wordpress.com/2009/03/19/freemarker-a-brief-example/)

<#macro myLayout title="FreeMarker example">
  <html> <head>
            <title> ${title} </title>
            <#include "header.ftl"/>
        </head>
    <body>
          <div class="menus">
            <#include "menu.ftl"/>
          </div>
          <div class="body">
            <#nested/>
          </div>
          <div class="footer">
            <#include "footer.ftl"/>
          </div>
    </body>
  </html>
</#macro>

<#import "layout/defaultLayout.ftl" as layout>
<@layout.myLayout "Home page">
  <div><h1>Hello Freemarker</h1></div>
</@layout.myLayout>

Is the above approach and using  Apache tiles with freemarker have same behavior in page rendering process.

If there are any differences in page rendering logic . Please help me to understand the differences and which one is better approach.

Thanks a lot.




------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
_______________________________________________
FreeMarker-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/freemarker-user