Categorization

Magnolia Categorization module provides a way of creating a central repository of categories. This module is available for Magnolia 4.0 and higher.

Installing Module

The module comes by default when you install the Extended Templating Kit Module bundle, to install just the Categorization Module see the general module installation instructions.

Configuration

The module provides two dialogs:

  • tabCategorization is a tab you can reference in one of your paragraphs where you can define categories from the central repository to a specific item. Then you can render this categories in a way like we do in demo-project in an-interesting-article page.
  • catCloud is used by the paragraph catCloud and will render the categories defined for the cloud. (sample in demo-project in an-interesting-article page)

Usage & Details

There is sample of usage in the Standard Templating Kit Module in website/demo-project.

What is provided by the module is a central repository for storing the categories, a paragraph to render categories clouds with the proper links.

Usually you would start by adding your categories to the central repository located in the data module, there you can define the importance (optional) of visibility for rendering in a cloud paragraph. Category names should be unique and you can group them in folders.

Next you would need to create a CategoryOverview page in your site where ever you like and a paragraph to render the category overview (list of pages using that category in the site).

Dependencies (optional)

This module comes with a command to generate categories automatically for your site. When installing it together with the observation and scheduler modules there is some configuration that can be activated. Both need to be set active (property active=true) and the path changed to your site root or root path depending on what you want to be categorized. Categories are generated for pages whose template type is 'stk', template category 'content' and template subcategory not empty. They won't be generated for pages under a template of category 'feature'. (i.e. will be generated for articles but not for glossary).

Scheduler

There are two commands provided, one to generate the categories and another one to remove them. Categories are removed just from website pages, central repository will keep its data. You can decide to run the command regularly by using the scheduler setting generateCategories/removeCategories job active and the cron time (note that you probably won't want to use the remove command more than once, remember to set it to false after using it).

Observation

You can have the command executed every time you create a new page, for that you set in the configuration generateCategories observation active.