Ambra Content Templating

Ambra uses custom made AmbraFreemarkerResult class that uses templateFile parameter to pass name of content .ftl that will be included in the main Freemarker page. There are three result-type's defined in struts.xml for each Freemarker template.

Freemarker template files (.ftl) will be searched in this order:

  1. Journal overrides in Journal jar file: /struts
  2. PLoS defaults in Ambra webapp: /journals/plosJournals
  3. Ambra defaults in Ambra webapp: /

When you want to override default look & feel of a page, all you need to do is place a new .ftl file in either specific journal or in /journals/plosJournals when you want new template to apply to all journals.

If you want to add a static page you can create a new .ftl and place it in /static directory. When invoking action ../static/new_page_name Ambra will try to load /static/new_page_name.ftl following previous rules.

Pages will include stylesheets and javascripts defined in defaults.xml in each journal.