title

FreeMarker macros in Tiny Marbles CMS

In Tiny Marbles CMS all HTML pages are created with the Java template engine FreeMarker. FreeMarker is designed to be practical for the generation of HTML Web pages, particularly by servlet-based applications following the MVC (Model View Controller) pattern, which is in case of Tiny Marbles CMS the Apache Struts framework.

Each FreeMarker template of Tiny Marbles CMS in turn calls FreeMarker macros, these macros are called 'widgets' to consistently generate user interfaces in HTML. The most important widgets are declared in the 'widget templates' of the package 'webcore' of the Tiny Marbles Framework. The FreeMarker templates in the folder /web/templates/ of package 'webcore' are devided in in three areas:

The approach with the FreeMarker templates and FreeMarker macros is a powerful feature of Tiny Marbles to create HTML code for administration pages as well as for public websites in a simple and intuitive way. Filtered lists, pagination, trees, tabs, image galleries or Ajax requests can be build very quickly using the widgets of the FreeMarker macro library.  

The widgets can be called with @show, @edit or @data from the following modules of the Tiny Marbles Framework: webcore, MUM, CMS and WSM. Here an example for creating a submit button for an HTML form:

<@edit.button label=action.getText("control.Zone.submit") />

Here a screenshot of Eclipse project:

webcore.png

The FreeMarker templates in MUM and CMS include the basic macros of 'webcore' and add their own specific macros for the administration pages (located in /web/templates/ of each modul):

  • widget_mum_show.ftl
  • widget_mum_edit.ftl
  • widget_cms_show.ftl
  • widget_cms_edit.ftl

The macros of the modul 'wsm' (website manager) are used to create the public websites. Each scheme gets its own set of macros. Therefore you find these macros in /web/templates/_scheme_name_/. Additionally macros for all schemes are located in /web/templates/common/:

  • widget_default_show.ftl
  • widget_financial_show.ftl
  • widget_flex_show.ftl 
  • widget_common_show.ftl

Here you can find the documentation of the basic macros of the package 'webcore' of the Tiny Marbles Framework.

Best essay editors edit your orders at reasonable prices . Once you attempting to find online homework help you might find it on this program.