FreeMarker and STK

An introduction into using FreeMarker as a Magnolia template language is given in our documentation.

The role FreeMarker has in the STK

FreeMarker is a very reduced templating language. For instance one can't write scriplets as you can in JSPs. FreeMarker templates are reduced to plain text (of which HTML is a special case) and some statements like if else and listing loops. The main power of the STK lays in its architecture, its clean html structure and its java classes. The templating language seems to be essential, while in fact it is just the icing on the cake.

It might even be possible to automatically transform the STK templates from FreeMarker to JSPs.

New to FreeMarker?

Read the Magnolia-specific FreeMarker primer

Mixing templating languages

STK is build in a way that you can plug in your custom needs (adding paragraphs, extending models, or changing/replacing one of the structural main templates). If you look at the parts you reuse as a black-box (and this is not the worst to do) you can add additional components by using jsp or some other implementations (spring, cold fusion, ..). I don't think this per se bad as long the templates written in the company use the same language.

STK vs. JSP?

I hope that we can adjust the impression (Magnolia drops jsp) by improving the documentation / communication. If there are to many concerns (and that is why I appreciate your remarks very much) we might have to think about how we can make STK a bit more JSP friendly. Considering the similarity of the language we might have to go for an auto conversion (freemarke -> jsp) so that we can deliver the two flavors. But for the time being we stick to freemarker as the module's preferred language.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Feb 06

    Stefan Bachert says:

    "The role FreeMarker has in the STK" Sounds very german. I guess this is hard t...

    "The role FreeMarker has in the STK"

    Sounds very german. I guess this is hard to understand from non-german speakers.

    You probably mean "the role of FreeMarker in the STK", or "the role which FreeMarker has in the STK"

    1. Feb 07

      Boris Kraft says:

      Actually I think the sentence is perfectly valid; check: http://www.google.com/s...

      Actually I think the sentence is perfectly valid; check: http://www.google.com/search?q=the+role+*+has+in

  2. Feb 06

    Stefan Bachert says:

    Both links to FreeMarker end up in nirwana!

    Both links to FreeMarker end up in nirwana!

    1. Feb 07

      Boris Kraft says:

      Links updated.

      Links updated.