Differences between revisions 2 and 3
Revision 2 as of 2013-04-24 09:45:58
Size: 1093
Comment:
Revision 3 as of 2013-11-11 10:24:25
Size: 1705
Comment:
Deletions are marked like this. Additions are marked like this.
Line 23: Line 23:

== Templates ==

Since version 3.2, the templates Marmotta internally uses are being copied to the home directory on deployment ((`${MARMOTTA_HOME}/templates`):

 * `admin.ftl` is the template used to build the admin user interface
 * `rdfhtml.ftl` renders RDF resources as HTML
 * `404.ftl` provides the error page when a requested resources is not found

That allows advanced users to customize the user interface by directly hacking the [[http://freemarker.org|freemarker]] templates. For instance to provide a customized view as HTML of the resources. But it requires to be very careful doing it.

Customizing Marmotta

There are some things Marmotta allows to customize.

Style

Besides the default style, you could customize the style of the admin interface. For that, you may need you set some concrete configurations:

kiwi.pages.startup = path/to/custom/welcome.html
kiwi.pages.project = custom
kiwi.pages.style_path = path/to/custom/style/
kiwi.pages.project.custom.logo = path/to/custom/logo.png
kiwi.pages.project.custom.footer = My custom project, developed with <a href="http://marmotta.incubator.apache.org">Apache Marmotta</a>

Where:

  • kiwi.pages.startup sets the custom page to use as welcome page

  • kiwi.pages.project assert that Marmotta will use a custom style

  • kiwi.pages.style_path indicates the base path were look for the normativle css files (see for example the custom style that LMF uses)

  • kiwi.pages.project.custom.logo is the relative url to the custom logo

  • kiwi.pages.project.custom.footer allows to write a custom footer

Templates

Since version 3.2, the templates Marmotta internally uses are being copied to the home directory on deployment ((${MARMOTTA_HOME}/templates):

  • admin.ftl is the template used to build the admin user interface

  • rdfhtml.ftl renders RDF resources as HTML

  • 404.ftl provides the error page when a requested resources is not found

That allows advanced users to customize the user interface by directly hacking the freemarker templates. For instance to provide a customized view as HTML of the resources. But it requires to be very careful doing it.

Customizing (last edited 2016-05-13 18:41:08 by SergioFernandez)