This page compares the Magnolia templating approaches and helps you choose the right one. If you are new to Magnolia, go with MTE.
Magnolia Templating Essentials (MTE)
Magnolia Templating Essentials (MTE) is a minimal set of reusable components. The MTE module contains essential templating function libraries. Its submodule Magnolia Templating Kit (MTK) contains component templates. MTE is front-end framework agnostic, which means you can integrate it with any modern framework or create your own templating kit.
Start new projects with the MTE. The STK is now in maintenance mode. We still maintain it but will not actively develop it further.
Standard Templating Kit (STK)
Standard Templating Kit (STK) is the predecessor to MTE. It provides best practices and templates for many common use cases. The STK includes ready-made functionality that can be extended for custom designs and content output. However, as front-end Web technologies evolved the STK started to feel too big with its many examples. Developers coming from Bootstrap and other modern frameworks were looking for something leaner and less time-consuming. The MTE was created to meet this demand.
You can run STK projects on Magnolia 5.4. Include the STK module in your project. There is no need to migrate your project to MTE.
Before Magnolia 5.4, the STK was a big rigid module that held a lot of very useful features. If you wanted to use features such as themes you had to depend on the STK module. Other modules such as RSS Aggregator, Categorization and some key imaging functions were also tightly bound to the STK and could not be used without it.
In Magnolia 5.4, we liberated the following features from the STK:
- Sites moved to a new Site module.
- Imaging functions moved to an already existing Imaging module.
- Some features such as categorization were split up between the old STK-bound module and a new liberated module.
Now you can use these features independent of the STK:
- RSS Aggregator
- Resources module and the Resources app
- Key templating features as themes, sites, the template prototype, and many atomic components
New modules were created in Magnolia 5.4:
The new Site module contains the template prototype and themes which were formerly part of the STK. Site is now the foundation for both MTE and STK.
- Module structure:
magnolia-site: Contains Java classes for sites and themes (see package info.magnolia.module.site.theme).
magnolia-site-app: Contains the Site app which you can use to manage site definitions.
- Resources module
- Imaging module
- Code: http://git.magnolia-cms.com/gitweb/?p=modules/site.git;a=summary
- Support: MGNLSITE
Magnolia Templating Essentials (MTE) module
The new MTE module provides a small number of atomic templating components such as text and image, links and teasers. Use the components to build templates for your next Magnolia project.
- Module structure:
- Code: http://git.magnolia-cms.com/gitweb/?p=modules/templating-essentials.git;a=summary
- Support: MTE
Modules liberated from STK
The following modules were liberated from STK into independent modules. You can use them with or without the STK.
The CategorizationSupport feature was moved from STK into the Categorization module. TemplateCategory and related utilities were moved to magnolia-main.
- MGNLCAT-146 - Getting issue details... STATUS
- MGNLCAT-149 - Getting issue details... STATUS
- MGNLCAT-147 - Getting issue details... STATUS
- MAGNOLIA-6042 - Getting issue details... STATUS
- RSS Aggregator module
RSS Aggregator module
Removed dependency to STK.
- MGNLRSSAGG-189 - Getting issue details... STATUS
|STK Themes||Themes in Site module|
STK Site app
|Site app in Site module|
Imaging Support 3.2+
Questions and answers
Can I use STK with Magnolia 5.4?
Yes. STK 2.9 is compatible with Magnolia 5.4. You can use it to run your old STK-based projects. This version of STK is smaller as we liberated functionality into independent modules.
Does Magnolia 5.4 include the STK?
No. Starting with Magnolia 5.4, the
ee-bundle webapps do not contain STK anymore. If you want to use STK with Magnolia 5.4, you have to add the STK module into your projects. You can add the relevant submodules
magnolia-demo-project if you really need it) to the webapp of your bundle.
Assuming that your module has a parent pom:
Add the dependencies including the version into the
Add the dependencies without the version into the
Do I need to change my STK project?
Probably not. While many features were liberated from STK 2.9 into other modules, most of these changes are "under the hood". You likely won't see them.
STKModuleVersionHandler upgrades STK 2.8 to 2.9 automatically.
Some classes are no longer needed:
info.magnolia.module.templatingkit.sites.STKSiteManager(new one is used)
Exception: You need to write your own migration task if you created custom definition classes for Site or Theme. This means, you subclassed
info.magnolia.module.templatingkit.style.Theme at some point. In this case, see what
STKModuleVersionHandler does to update to STK 2.9.
If you need help, contact Magnolia Support.