Magnolia 5.4 reached end of life on November 15, 2018. This branch is no longer supported, see End-of-life policy.
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) 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 still maintained but will not be actively developed further.
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:
Now you can use these features independent of the STK:
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.
magnolia-site-parent
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.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.
magnolia-templating-essentials-parent
magnolia-templating-kit
magnolia-templating-essentials-imaging
magnolia-templating-essentials-models
magnolia-site
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.
JIRA issues:
Dependencies:
Removed dependency to STK.
JIRA issues:
Dependencies:
magnolia-templating-essentials-models
STK function | Replacement |
---|---|
| SiteManager in Site module |
STK Themes | Themes in Site module |
STK Site app | Site app in Site module |
ImagingSupport | ImagingSupport in Imaging Support module |
Deprecated | Replacement | New Home |
---|---|---|
| info.magnolia.module.site.SiteManager | Site 1.0+ |
| info.magnolia.module.site.DefaultSiteManager | Site 1.0+ |
|
| |
|
| Imaging Support 3.2+ |
|
| STK 2.9+ |
info.magnolia.module.templatingkit.categorization.CategorizationSupport | info.magnolia.module.categorization.support.CategorizationSupport | Categorization 2.4+ |
| ||
info.magnolia.module.templatingkit.sites.STKI18n | ||
|
| STK 2.9+ Rendering 4.0+ |
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.
No. Starting with Magnolia 5.4, the ce-bundle
and 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-module-standard-templating-kit
and magnolia-theme-pop
(and 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 dependencyManagement
section of example-project/pom.xml
<dependencyManagement> <dependencies> <!-- more dependencies here... --> <dependency> <groupId>info.magnolia</groupId> <artifactId>magnolia-module-standard-templating-kit</artifactId> <version>2.9.4</version> </dependency> <dependency> <groupId>info.magnolia</groupId> <artifactId>magnolia-demo-project</artifactId> <version>2.9.4</version> </dependency> <dependency> <groupId>info.magnolia</groupId> <artifactId>magnolia-theme-pop</artifactId> <version>2.9.4</version> </dependency> <!-- more dependencies here... --> </dependencies> </dependencyManagement>
Add the dependencies without the version into the dependencies
section of example-project/example-project-webapp/pom.xml
<dependencies> <!-- more dependencies here... --> <dependency> <groupId>info.magnolia</groupId> <artifactId>magnolia-module-standard-templating-kit</artifactId> </dependency> <dependency> <groupId>info.magnolia</groupId> <artifactId>magnolia-demo-project</artifactId> </dependency> <dependency> <groupId>info.magnolia</groupId> <artifactId>magnolia-theme-pop</artifactId> </dependency> <!-- more dependencies here... --> </dependencies>
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.ExtendedAggregationState
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.sites.Site
or 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.