Documentation for Freemarker

git-svn-id: https://svn.libreccm.org/ccm/trunk@6132 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2019-06-11 18:23:37 +00:00
parent ba413b4237
commit c64fbce5a6
4 changed files with 632 additions and 575 deletions

View File

@ -1,4 +1,4 @@
FILES = themes-with-freemarker.md # FILES = themes-with-freemarker.md
FILES += ../../ccm-cms/doc/freemarker/ccm-cms.md FILES += ../../ccm-cms/doc/freemarker/ccm-cms.md
FILES += ../../ccm-cms-assets-fileattachment/doc/freemarker/ccm-cms-assets-fileattachment.md FILES += ../../ccm-cms-assets-fileattachment/doc/freemarker/ccm-cms-assets-fileattachment.md
FILES += ../../ccm-cms-assets-imagestep/doc/freemarker/ccm-cms-assets-imagestep.md FILES += ../../ccm-cms-assets-imagestep/doc/freemarker/ccm-cms-assets-imagestep.md
@ -49,7 +49,12 @@ FILES += ../../ccm-themedirector/doc/freemarker/ccm-themedirector/utils.md
all: html pdf all: html pdf
html: html:
pandoc -t html -o themes-with-freemarker.html ${FILES} pandoc -t markdown -o functions-reference.tmp.md ${FILES} --base-header-level=3
pandoc -t html -o themes-with-freemarker.html themes-with-freemarker.md functions-reference.tmp.md
rm functions-reference.tmp.md
pdf: pdf:
pandoc -t latex -o themes-with-freemarker.pdf ${FILES} pandoc -t markdown -o functions-reference.tmp.md ${FILES} --base-header-level=3
pandoc -t latex -o themes-with-freemarker.pdf themes-with-freemarker.md functions-reference.tmp.md
rm functions-reference.tmp.md

File diff suppressed because it is too large Load Diff

View File

@ -26,9 +26,61 @@ the XML structure changes.
## General structure of a Freemarker theme ## General structure of a Freemarker theme
Freemarker themes have a different structure than the usual "old style" themes of LibreCCM. Freemarker themes have a different structure than the usual "old style" themes
of LibreCCM. Each Freemaker based theme must have a theme manifest file
called `theme.json` on the root of its directory structure. This file
provides several informations for processing the theme and serves as a
central configuration point. The file must have the following structure:
{
"name": "an-example-theme",
"templates": {
"applications": [
{
"application-name": "someApp",
"application-class": "somePageClass",
"template": "/templates/someApp.html.ftl"
},
...
],
"contentitems": [
{
"view": "list",
"contentType": "com.arsdigita.cms.contenttypes.Article",
"template": "/templates/contentitems/list/article.html.ftl"
},
{
"view": "details",
"contentType": "com.arsdigita.cms.contenttypes.Article",
"template": "/templates/contentitems/detail/article.html.ftl"
},
{
"view": "details",
"contentType": "com.arsdigita.cms.contenttypes.Article",
"style": "fancy",
"template": "/templates/contentitems/detail/article.html.ftl"
},
...
],
"default-application-template": "/templates/default-layout.html.ftl",
"default-contentitem-template": "/templates/contentitems/detail/default.html.ftl",
},
"data-time-formats": [
{
"style": "event",
"lang": "de",
"format": "dd. MMM. YYYY"
},
{
"style": "event",
"lang": "en",
"format": "MM/dd/YY"
},
...
]
}
ToDo
## Predefined variables and functions ## Predefined variables and functions