Page History
...
Make sure your bundle contains the Content tags modules (magnolia-content-tags-core
and magnolia-content-tags-ui
).
You can enable content tags in a new content app or in one that already exists. In the examples below, we modify existing apps using decoration. We assume that you are familiar with Magnolia content apps and Definition decoration.
Table of Contents | ||||
---|---|---|---|---|
|
...
Browser subapp
You must update your Browser subapp descriptor to be able to:
...
- Set the property
subAppClass
toinfo.magnolia.contenttags.shortcut.TagShortcutAwareBrowserSubApp
. - Add the action
info.magnolia.contenttags.dialog.OpenTagDialogActionDefinition
and make it available for the content items for which you want to enable tags.
If you give the action the nameaddTags
, the system automatically provides a translation for the default language (English). If you are using a different name or if you want to change the default translation ("Add tags"), provide an i18n key. - Make sure the views of the Workbench have columns to display the tags: on the view
search
set the propertyimplementationClass
toinfo.magnolia.contenttags.app.contenttool.search.TagSearchPresenter
.
...
Detail subapp
You must update your Detail subapp descriptor so that authors can then add tags while creating or editing a content item.
...
Add a configuration node for the workspace - the workspace used by the content app for the content items to which you add tags. Thi ensures, tha when you delete a tag from the Tags app, the system checks for occurrences of these tags on registered workspaces, it shows notifications about these occurrences and, if you agree, it removes references of the tags on content items in registered workspaces.
...
In both examples we use decoration to adapt the subapps.
Multiexcerpt include | ||||
---|---|---|---|---|
|
Decoration is used to modify the existing tours
app. The decoration is applied by the module magnolia-travel-demo-content-tags
(see the Tours app example). As an additional example we have decorated the contacts
app (see the Contacts app example).
...
The tours
app is defined in the submodule magnolia-travel-tours
of the demo-projects
module. The demo-projects module is available since Magnolia 5.4 and is bundled with various preconfigured Magnolia webapps and bundles.
Since Magnolia 5.6, the demo-projects module for Enterprise Pro webapps comes with the submodule magnolia-travel-demo-content-tags
. This submodule decorates the Tours app.
...
In this example, we enable tagging in the Contacts app. This example does not rely on the demo modules. Compare this example with the Tours app decoration example above – note that the decoration for the Contacts app is very similar.
...