Magnolia 5.4 reached end of life on November 15, 2018. This branch is no longer supported, see End-of-life policy.

Page tree
Skip to end of metadata
Go to start of metadata

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.

Big picture

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:

  • Categorization
  • RSS Aggregator
  • Resources module and the Resources app
  • Key templating features as themes, sites, the template prototype, and many atomic components

New modules

New modules were created in Magnolia 5.4:

Site module

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 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. 

Modules liberated from STK

The following modules were liberated from STK into independent modules. You can use them with or without the STK.

Categorization module

The CategorizationSupport feature was moved from STK into the Categorization module. TemplateCategory and related utilities were moved to magnolia-main.

JIRA issues:

Dependencies:

  • RSS Aggregator module

RSS Aggregator module

Removed dependency to STK.

JIRA issues:

Dependencies:

  • magnolia-templating-essentials-models

Moved functionality

STK functionReplacement

SiteManager

SiteManager in Site module
STK ThemesThemes in Site module

STK Site app

Site app in Site module
ImagingSupportImagingSupport in Imaging Support module

Deprecated classes

(minus) Deprecated

(plus) ReplacementNew Home

info.magnolia.module.templatingkit.sites.SiteManager

info.magnolia.module.site.SiteManagerSite 1.0+

info.magnolia.module.templatingkit.sites.STKSiteManager

info.magnolia.module.site.DefaultSiteManagerSite 1.0+

info.magnolia.module.templatingkit.ExtendedAggregationState

 

 

info.magnolia.module.templatingkit.imaging.ImagingSupport

info.magnolia.imaging.ImagingSupport

Imaging Support 3.2+

info.magnolia.module.templatingkit.style.BodyClassResolver

info.magnolia.module.templatingkit.style.BodyClassResolver

STK 2.9+

info.magnolia.module.templatingkit.categorization.CategorizationSupportinfo.magnolia.module.categorization.support.CategorizationSupportCategorization 2.4+

info.magnolia.module.templatingkit.templates.category.TemplateCategory

  
info.magnolia.module.templatingkit.sites.STKI18n  

info.magnolia.module.templatingkit.templates.pages.STKPage

  • #getCategory()
  • #getSubCategory()

info.magnolia.module.templatingkit.templates.pages.STKPage

  • #getCategory()
  • #getSubCategory()
  • #getType()
  • #getSubType()

info.magnolia.rendering.template.TemplateDefinition

  • #getType()
  • #getSubType()

STK 2.9+




Rendering 4.0+

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 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:

  1. Add the dependencies including the version into the dependencyManagement section of example-project/pom.xml

    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>
    
    
  2. Add the dependencies  without the version into the dependencies section of example-project/example-project-webapp/pom.xml

    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>
    

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.ExtendedAggregationState
  • info.magnolia.module.templatingkit.sites.STKSiteManager (new one is used)

(warning) 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.