Magnolia 6.1 reached end of life on March 31, 2021. 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 explains how to enable content tagging in a content app so that authors can add tags to content items.

The dx-core-demo-webapp contains an example of how to use the Content Tags module. In this page, we show how the Tours app has been modified to enable tagging for tours, and we also provide general instructions and code samples showing how to enable tagging in other apps (Contacts app example).

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.

Enabling tagging in content apps

Update the configuration of your content app subapps to enable content tagging.

You may also register the workspace in the configuration of the content-tags module to ensure that dependencies are managed across workspaces when you delete data.

Browser subapp

You must update your Browser subapp descriptor to be able to:

  • Add tags to existing content items.
  • Display applied tags.
  • Search content items by tag in the search view.

To do so:

  1. Set the property subAppClass to info.magnolia.contenttags.shortcut.TagShortcutAwareBrowserSubApp
  2. 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 name addTags, 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. 
  3. Make sure the views of the Workbench have columns to display the tags: on the view search set the property implementationClass to info.magnolia.contenttags.app.contenttool.search.TagSearchPresenter.

When decorating your content app later, make sure you select the proper node type in the decoration of the browser subapp. (See lines 12-13 in both examples below concerning the browser subapp.)

And make sure you to use the proper node names in the action bar sections. (See lines 17-20 in both examples below concerning the browser subapp.)

Detail subapp

You must update your Detail subapp descriptor so that authors can then add tags while creating or editing a content item.

To do so:

  1. Add a field of type info.magnolia.contenttags.form.field.TagFieldDefinition
  2. Add an action with the action class info.magnolia.contenttags.form.action.SaveDialogWithTagsActionDefinition

When decorating your content app later, make sure you check the "path" of nodes from the name of the editor (line 1) to the fields (line 5) in the decoration of the detail subapp. In particular, names for tabs within a form very often vary among different apps.

Configure content dependency in the content-tags configuration

This step is optional but recommended; it ensures JCR data sanity and improves user experience.

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.

To enable this, add a node to /modules/content-tags-core/config/taggableWorkspaces:

Node nameValue

 modules


 content-tags-core


 config


 taggableWorkspaces

com.example.templates.CustomTemplateDefinition

 <just-a-name>


 appMapping

app:tours:detail

 workspace

tours

taggableWorkspaces

required

The "root" node for content dependencies registration.

<name>

required

An arbitrary name to register one taggable workspace.

appMapping

required

Use the pattern apps:<appname>:<detail-subapp-name>

workspace

required

The name of the workspace of the content app.

Examples

In both examples, we use decoration to adapt the subapps. Definition decoration is a mechanism that allows you to change the properties and subdefinitions of an existing definition item.

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

In addition to decorating the apps, we also adapt the content-tags configuration to  ensure that dependencies are managed across workspaces when you delete data. 

Tours app

The tours app is defined in the submodule  magnolia-travel-tours of the  demo-projects module. The demo-projects module is bundled with various preconfigured Magnolia webapps and bundles.

The demo-projects module for DX Core webapp comes with the submodule  magnolia-travel-demo-content-tags . This submodule decorates the Tours app.

Decoration of the browser subapp

/travel-demo-content-tags/decorations/tours/apps/tours.subApps.browser.yaml
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>Log in - Magnolia Bitbucket</title><script>
window.WRM=window.WRM||{};window.WRM._unparsedData=window.WRM._unparsedData||{};window.WRM._unparsedErrors=window.WRM._unparsedErrors||{};
WRM._unparsedData["com.atlassian.plugins.atlassian-plugins-webresource-plugin:context-path.context-path"]="\u0022\u0022";
WRM._unparsedData["com.atlassian.bitbucket.server.bitbucket-webpack-INTERNAL:date-format-preference.data"]="\u0022\u0022";
WRM._unparsedData["com.atlassian.bitbucket.server.bitbucket-webpack-INTERNAL:user-keyboard-shortcuts-enabled.data"]="true";
WRM._unparsedData["com.atlassian.analytics.analytics-client:policy-update-init.policy-update-data-provider"]="false";
WRM._unparsedData["com.atlassian.analytics.analytics-client:programmatic-analytics-init.programmatic-analytics-data-provider"]="false";
WRM._unparsedData["com.atlassian.bitbucket.plugins.bitbucket-slack-server-integration-plugin:slack-link-error-resources.slack-link-error"]="{}";
WRM._unparsedData["com.atlassian.bitbucket.server.feature-wrm-data:user.time.zone.onboarding.data"]="true";
if(window.WRM._dataArrived)window.WRM._dataArrived();</script>
<link type="text/css" rel="stylesheet" href="/s/0d1fa1028b02df7338f91a0ab00f30c4-CDN/-904032392/9cff12d/5br15h/dec21fd92d4145e2dc34c5950f3f77f2/_/download/contextbatch/css/_super/batch.css" data-wrm-key="_super" data-wrm-batch-type="context" media="all">
<link type="text/css" rel="stylesheet" href="/s/f6b416350902a5bb1f1485c4255a78a5-CDN/-904032392/9cff12d/5br15h/35279485dbf16b8ccb088f889334b46f/_/download/contextbatch/css/bitbucket.page.login,-_super/batch.css" data-wrm-key="bitbucket.page.login,-_super" data-wrm-batch-type="context" media="all">
<link type="text/css" rel="stylesheet" href="/s/593cbeab5ee49bb74afeab19881011c6-CDN/-904032392/9cff12d/5br15h/abd4dafd90f22871a5e61a4a39b07778/_/download/contextbatch/css/bitbucket.layout.focused,bitbucket.layout.base,atl.general,-_super/batch.css?slack-enabled=true" data-wrm-key="bitbucket.layout.focused,bitbucket.layout.base,atl.general,-_super" data-wrm-batch-type="context" media="all">
<script type="text/javascript" src="/s/f9dcfca87b48f93709c797c5725ff653-CDN/-904032392/9cff12d/5br15h/dec21fd92d4145e2dc34c5950f3f77f2/_/download/contextbatch/js/_super/batch.js?locale=en-US" data-wrm-key="_super" data-wrm-batch-type="context" data-initially-rendered></script>
<script type="text/javascript" src="/s/544a5c139b566e1ce94969997e3ce0b5-CDN/-904032392/9cff12d/5br15h/35279485dbf16b8ccb088f889334b46f/_/download/contextbatch/js/bitbucket.page.login,-_super/batch.js?locale=en-US" data-wrm-key="bitbucket.page.login,-_super" data-wrm-batch-type="context" data-initially-rendered></script>
<script type="text/javascript" src="/s/d2cf8ecc6e4f8f75094474d5677c9ac9-CDN/-904032392/9cff12d/5br15h/abd4dafd90f22871a5e61a4a39b07778/_/download/contextbatch/js/bitbucket.layout.focused,bitbucket.layout.base,atl.general,-_super/batch.js?locale=en-US&amp;slack-enabled=true" data-wrm-key="bitbucket.layout.focused,bitbucket.layout.base,atl.general,-_super" data-wrm-batch-type="context" data-initially-rendered></script>
<meta name="application-name" content="Bitbucket"><link rel="shortcut icon" type="image/x-icon" href="/s/-904032392/9cff12d/5br15h/1.0/_/download/resources/com.atlassian.bitbucket.server.bitbucket-webpack-INTERNAL:favicon/favicon.ico" /><link rel="search" href="https://git.magnolia-cms.com/plugins/servlet/opensearch-descriptor" type="application/opensearchdescription+xml" title="Bitbucket code search"/></head><body class="aui-page-focused aui-page-focused-small aui-page-size-small bitbucket-theme user-login aui-legacy-focus"><ul id="assistive-skip-links" class="assistive"><li><a href="#content">Skip to content</a></li></ul><div id="page"><!-- start #header --><header id="header" role="banner"><section class="notifications"></section><nav class="aui-header aui-dropdown2-trigger-group" role="navigation"><div class="aui-header-inner"><div class="aui-header-before"><a class=" aui-dropdown2-trigger app-switcher-trigger" aria-controls="app-switcher" aria-haspopup="true" role="button" tabindex="0" data-aui-trigger href="#app-switcher"><span class="aui-icon aui-icon-small aui-iconfont-appswitcher">Linked Applications</span></a><div id="app-switcher" class="aui-dropdown2 aui-style-default" role="menu" aria-hidden="true" data-is-switcher="true" data-environment="{&quot;isUserAdmin&quot;:false,&quot;isAppSuggestionAvailable&quot;:false,&quot;isSiteAdminUser&quot;:false}"><div role="application"><div class="app-switcher-loading">Loading&hellip;</div></div></div></div><div class="aui-header-primary"><h1 id="logo" class="bitbucket-header-logo"><a href="https://git.magnolia-cms.com">Bitbucket</a></h1><ul class="aui-nav"></ul></div><div class="aui-header-secondary"><ul class="aui-nav"><li class=" help-link"title="Help"><a class=" aui-dropdown2-trigger aui-dropdown2-trigger-arrowless" aria-controls="com.atlassian.bitbucket.server.bitbucket-server-web-fragments-help-menu" aria-haspopup="true" role="button" tabindex="0" data-aui-trigger><span class="aui-icon aui-icon-small aui-icon-small aui-iconfont-question-circle">Help</span></a><div id="com.atlassian.bitbucket.server.bitbucket-server-web-fragments-help-menu" class="aui-dropdown2 aui-style-default" role="menu" aria-hidden="true"><div role="application"><div class="aui-dropdown2-section help-items-section"><ul class="aui-list-truncate" role="presentation"><li role="presentation"><a href="https://docs.atlassian.com/bitbucketserver/docs-0711/Bitbucket+Server+documentation?utm_campaign=in-app-help&amp;amp;utm_medium=in-app-help&amp;amp;utm_source=stash" title="Go to the online documentation for Bitbucket" data-web-item-key="com.atlassian.bitbucket.server.bitbucket-server-web-fragments:general-help">Online help</a></li><li role="presentation"><a href="https://www.atlassian.com/git?utm_campaign=learn-git&amp;utm_medium=in-app-help&amp;utm_source=stash" title="Learn about Git commands &amp; workflows" data-web-item-key="com.atlassian.bitbucket.server.bitbucket-server-web-fragments:learn-git">Learn Git</a></li><li role="presentation"><a href="/getting-started" class="getting-started-page-link" title="Overview of Bitbucket features" data-web-item-key="com.atlassian.bitbucket.server.bitbucket-server-web-fragments:getting-started-page-help-link">Welcome to Bitbucket</a></li><li role="presentation"><a href="/#" class="keyboard-shortcut-link" title="Discover keyboard shortcuts in Bitbucket" data-web-item-key="com.atlassian.bitbucket.server.bitbucket-server-web-fragments:keyboard-shortcuts-help-link">Keyboard shortcuts</a></li><li role="presentation"><a href="https://go.atlassian.com/bitbucket-server-whats-new?utm_campaign=in-app-help&amp;utm_medium=in-app-help&amp;utm_source=stash" title="Learn about what&#39;s new in Bitbucket" data-web-item-key="com.atlassian.bitbucket.server.bitbucket-server-web-fragments:whats-new-link">What&#39;s new</a></li><li role="presentation"><a href="https://go.atlassian.com/bitbucket-server-community?utm_campaign=in-app-help&amp;utm_medium=in-app-help&amp;utm_source=stash" title="Explore the Atlassian community" data-web-item-key="com.atlassian.bitbucket.server.bitbucket-server-web-fragments:community-link">Community</a></li></ul></div></div></div></li><li class=" alerts-menu"title="View system alerts"><a href="#alerts" id="alerts-trigger" class="alerts-menu" title="View system alerts" data-web-item-key="com.atlassian.bitbucket.server.bitbucket-server-web-fragments:global-alerts-menu-item">Alerts</a></li></ul></div></div> <!-- End .aui-header-inner --></nav> <!-- End .aui-header --></header><!-- End #header --><!-- Start #content --><section id="content" role="main" tabindex="-1" data-timezone="-120" ><div class="aui-page-panel content-body"><div class="aui-page-panel-inner"><section class="aui-page-panel-content"><h2>Log in</h2><form class="aui top-label prevent-double-submit " action="/j_atl_security_check" method="post" accept-charset="UTF-8"><div class="field-group"><label for="j_username" >Username</label><input class="text long-field" type="text" id="j_username"  name="j_username"  autofocus accesskey="u"/></div><div class="field-group"><label for="j_password" >Password</label><input class="text long-field" type="password" id="j_password"  name="j_password"  accesskey="p"/></div><div class="aui-group"><fieldset class="group checkbox"><div class="checkbox"><input class="checkbox" type="checkbox" id="_atl_remember_me"  name="_atl_remember_me"  checked="checked"  accesskey="r"/><label for="_atl_remember_me" >Keep me logged in</label></div></fieldset></div><div class="aui-group"><input name="next" type="hidden" value="/projects/MODULES/repos/demo-projects/raw/enterprise/magnolia-travel-demo-content-tags/src/main/resources/travel-demo-content-tags/decorations/tours/apps/tours.subApps.browser.yaml?at=master"/><input name="queryString" type="hidden" value="next=/projects/MODULES/repos/demo-projects/raw/enterprise/magnolia-travel-demo-content-tags/src/main/resources/travel-demo-content-tags/decorations/tours/apps/tours.subApps.browser.yaml?at%3Dmaster"/><input class="aui-button aui-button-primary" type="submit" id="submit"  name="submit"  value="Log in" accesskey="s"/><a id="forgot" class="aui-button aui-button-link"  name="forgot" href="/passwordreset" autocomplete="off" tabindex="0">Unable to access your account?</a></div></form></section><!-- .aui-page-panel-content --></div><!-- .aui-page-panel-inner --></div><!-- .aui-page-panel --></section><!-- End #content --><!-- Start #footer --><footer id="footer" role="contentinfo"><section class="notifications"></section><section class="footer-body"><ul><li data-key="footer.license.message">Git repository management for enterprise teams powered by <a href="https://www.atlassian.com/software/bitbucket/">Atlassian Bitbucket</a></li></ul><ul><li>Atlassian Bitbucket <span title="9cff12d7ea476637adec832a01be71e1c2ab1695" id="product-version" data-commitid="9cff12d7ea476637adec832a01be71e1c2ab1695" data-system-build-number="9cff12d"> v7.11.1</span></li><li data-key="footer.links.documentation"><a href="https://docs.atlassian.com/bitbucketserver/docs-0711/Bitbucket+Server+documentation?utm_campaign=in-app-help&amp;utm_medium=in-app-help&amp;utm_source=stash" target="_blank">Documentation</a></li><li data-key="footer.links.jac"><a href="https://jira.atlassian.com/browse/BSERV?utm_campaign=in-app-help&amp;utm_medium=in-app-help&amp;utm_source=stash" target="_blank">Request a feature</a></li><li data-key="footer.links.about"><a href="/about">About</a></li><li data-key="footer.links.contact.atlassian"><a href="https://www.atlassian.com/company/contact?utm_campaign=in-app-help&amp;utm_medium=in-app-help&amp;utm_source=stash" target="_blank">Contact Atlassian</a></li></ul><div id="footer-logo"><a href="https://www.atlassian.com/" target="_blank">Atlassian</a></div></section></footer><!-- End #footer --></div><script>require('bitbucket/internal/layout/base/base').onReady(null, "Magnolia Bitbucket" ); require('bitbucket/internal/widget/keyboard-shortcuts/keyboard-shortcuts').onReady();</script><script type="text/javascript">require('bitbucket/internal/page/login/login').onReady();</script></body></html>

Decoration of the detail subapp

/travel-demo-content-tags/decorations/tours/apps/tours.subApps.detail.yaml
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>Log in - Magnolia Bitbucket</title><script>
window.WRM=window.WRM||{};window.WRM._unparsedData=window.WRM._unparsedData||{};window.WRM._unparsedErrors=window.WRM._unparsedErrors||{};
WRM._unparsedData["com.atlassian.plugins.atlassian-plugins-webresource-plugin:context-path.context-path"]="\u0022\u0022";
WRM._unparsedData["com.atlassian.bitbucket.server.bitbucket-webpack-INTERNAL:date-format-preference.data"]="\u0022\u0022";
WRM._unparsedData["com.atlassian.bitbucket.server.bitbucket-webpack-INTERNAL:user-keyboard-shortcuts-enabled.data"]="true";
WRM._unparsedData["com.atlassian.analytics.analytics-client:policy-update-init.policy-update-data-provider"]="false";
WRM._unparsedData["com.atlassian.analytics.analytics-client:programmatic-analytics-init.programmatic-analytics-data-provider"]="false";
WRM._unparsedData["com.atlassian.bitbucket.plugins.bitbucket-slack-server-integration-plugin:slack-link-error-resources.slack-link-error"]="{}";
WRM._unparsedData["com.atlassian.bitbucket.server.feature-wrm-data:user.time.zone.onboarding.data"]="true";
if(window.WRM._dataArrived)window.WRM._dataArrived();</script>
<link type="text/css" rel="stylesheet" href="/s/0d1fa1028b02df7338f91a0ab00f30c4-CDN/-904032392/9cff12d/5br15h/dec21fd92d4145e2dc34c5950f3f77f2/_/download/contextbatch/css/_super/batch.css" data-wrm-key="_super" data-wrm-batch-type="context" media="all">
<link type="text/css" rel="stylesheet" href="/s/f6b416350902a5bb1f1485c4255a78a5-CDN/-904032392/9cff12d/5br15h/35279485dbf16b8ccb088f889334b46f/_/download/contextbatch/css/bitbucket.page.login,-_super/batch.css" data-wrm-key="bitbucket.page.login,-_super" data-wrm-batch-type="context" media="all">
<link type="text/css" rel="stylesheet" href="/s/593cbeab5ee49bb74afeab19881011c6-CDN/-904032392/9cff12d/5br15h/abd4dafd90f22871a5e61a4a39b07778/_/download/contextbatch/css/bitbucket.layout.focused,bitbucket.layout.base,atl.general,-_super/batch.css?slack-enabled=true" data-wrm-key="bitbucket.layout.focused,bitbucket.layout.base,atl.general,-_super" data-wrm-batch-type="context" media="all">
<script type="text/javascript" src="/s/f9dcfca87b48f93709c797c5725ff653-CDN/-904032392/9cff12d/5br15h/dec21fd92d4145e2dc34c5950f3f77f2/_/download/contextbatch/js/_super/batch.js?locale=en-US" data-wrm-key="_super" data-wrm-batch-type="context" data-initially-rendered></script>
<script type="text/javascript" src="/s/544a5c139b566e1ce94969997e3ce0b5-CDN/-904032392/9cff12d/5br15h/35279485dbf16b8ccb088f889334b46f/_/download/contextbatch/js/bitbucket.page.login,-_super/batch.js?locale=en-US" data-wrm-key="bitbucket.page.login,-_super" data-wrm-batch-type="context" data-initially-rendered></script>
<script type="text/javascript" src="/s/d2cf8ecc6e4f8f75094474d5677c9ac9-CDN/-904032392/9cff12d/5br15h/abd4dafd90f22871a5e61a4a39b07778/_/download/contextbatch/js/bitbucket.layout.focused,bitbucket.layout.base,atl.general,-_super/batch.js?locale=en-US&amp;slack-enabled=true" data-wrm-key="bitbucket.layout.focused,bitbucket.layout.base,atl.general,-_super" data-wrm-batch-type="context" data-initially-rendered></script>
<meta name="application-name" content="Bitbucket"><link rel="shortcut icon" type="image/x-icon" href="/s/-904032392/9cff12d/5br15h/1.0/_/download/resources/com.atlassian.bitbucket.server.bitbucket-webpack-INTERNAL:favicon/favicon.ico" /><link rel="search" href="https://git.magnolia-cms.com/plugins/servlet/opensearch-descriptor" type="application/opensearchdescription+xml" title="Bitbucket code search"/></head><body class="aui-page-focused aui-page-focused-small aui-page-size-small bitbucket-theme user-login aui-legacy-focus"><ul id="assistive-skip-links" class="assistive"><li><a href="#content">Skip to content</a></li></ul><div id="page"><!-- start #header --><header id="header" role="banner"><section class="notifications"></section><nav class="aui-header aui-dropdown2-trigger-group" role="navigation"><div class="aui-header-inner"><div class="aui-header-before"><a class=" aui-dropdown2-trigger app-switcher-trigger" aria-controls="app-switcher" aria-haspopup="true" role="button" tabindex="0" data-aui-trigger href="#app-switcher"><span class="aui-icon aui-icon-small aui-iconfont-appswitcher">Linked Applications</span></a><div id="app-switcher" class="aui-dropdown2 aui-style-default" role="menu" aria-hidden="true" data-is-switcher="true" data-environment="{&quot;isUserAdmin&quot;:false,&quot;isAppSuggestionAvailable&quot;:false,&quot;isSiteAdminUser&quot;:false}"><div role="application"><div class="app-switcher-loading">Loading&hellip;</div></div></div></div><div class="aui-header-primary"><h1 id="logo" class="bitbucket-header-logo"><a href="https://git.magnolia-cms.com">Bitbucket</a></h1><ul class="aui-nav"></ul></div><div class="aui-header-secondary"><ul class="aui-nav"><li class=" help-link"title="Help"><a class=" aui-dropdown2-trigger aui-dropdown2-trigger-arrowless" aria-controls="com.atlassian.bitbucket.server.bitbucket-server-web-fragments-help-menu" aria-haspopup="true" role="button" tabindex="0" data-aui-trigger><span class="aui-icon aui-icon-small aui-icon-small aui-iconfont-question-circle">Help</span></a><div id="com.atlassian.bitbucket.server.bitbucket-server-web-fragments-help-menu" class="aui-dropdown2 aui-style-default" role="menu" aria-hidden="true"><div role="application"><div class="aui-dropdown2-section help-items-section"><ul class="aui-list-truncate" role="presentation"><li role="presentation"><a href="https://docs.atlassian.com/bitbucketserver/docs-0711/Bitbucket+Server+documentation?utm_campaign=in-app-help&amp;amp;utm_medium=in-app-help&amp;amp;utm_source=stash" title="Go to the online documentation for Bitbucket" data-web-item-key="com.atlassian.bitbucket.server.bitbucket-server-web-fragments:general-help">Online help</a></li><li role="presentation"><a href="https://www.atlassian.com/git?utm_campaign=learn-git&amp;utm_medium=in-app-help&amp;utm_source=stash" title="Learn about Git commands &amp; workflows" data-web-item-key="com.atlassian.bitbucket.server.bitbucket-server-web-fragments:learn-git">Learn Git</a></li><li role="presentation"><a href="/getting-started" class="getting-started-page-link" title="Overview of Bitbucket features" data-web-item-key="com.atlassian.bitbucket.server.bitbucket-server-web-fragments:getting-started-page-help-link">Welcome to Bitbucket</a></li><li role="presentation"><a href="/#" class="keyboard-shortcut-link" title="Discover keyboard shortcuts in Bitbucket" data-web-item-key="com.atlassian.bitbucket.server.bitbucket-server-web-fragments:keyboard-shortcuts-help-link">Keyboard shortcuts</a></li><li role="presentation"><a href="https://go.atlassian.com/bitbucket-server-whats-new?utm_campaign=in-app-help&amp;utm_medium=in-app-help&amp;utm_source=stash" title="Learn about what&#39;s new in Bitbucket" data-web-item-key="com.atlassian.bitbucket.server.bitbucket-server-web-fragments:whats-new-link">What&#39;s new</a></li><li role="presentation"><a href="https://go.atlassian.com/bitbucket-server-community?utm_campaign=in-app-help&amp;utm_medium=in-app-help&amp;utm_source=stash" title="Explore the Atlassian community" data-web-item-key="com.atlassian.bitbucket.server.bitbucket-server-web-fragments:community-link">Community</a></li></ul></div></div></div></li><li class=" alerts-menu"title="View system alerts"><a href="#alerts" id="alerts-trigger" class="alerts-menu" title="View system alerts" data-web-item-key="com.atlassian.bitbucket.server.bitbucket-server-web-fragments:global-alerts-menu-item">Alerts</a></li></ul></div></div> <!-- End .aui-header-inner --></nav> <!-- End .aui-header --></header><!-- End #header --><!-- Start #content --><section id="content" role="main" tabindex="-1" data-timezone="-120" ><div class="aui-page-panel content-body"><div class="aui-page-panel-inner"><section class="aui-page-panel-content"><h2>Log in</h2><form class="aui top-label prevent-double-submit " action="/j_atl_security_check" method="post" accept-charset="UTF-8"><div class="field-group"><label for="j_username" >Username</label><input class="text long-field" type="text" id="j_username"  name="j_username"  autofocus accesskey="u"/></div><div class="field-group"><label for="j_password" >Password</label><input class="text long-field" type="password" id="j_password"  name="j_password"  accesskey="p"/></div><div class="aui-group"><fieldset class="group checkbox"><div class="checkbox"><input class="checkbox" type="checkbox" id="_atl_remember_me"  name="_atl_remember_me"  checked="checked"  accesskey="r"/><label for="_atl_remember_me" >Keep me logged in</label></div></fieldset></div><div class="aui-group"><input name="next" type="hidden" value="/projects/MODULES/repos/demo-projects/raw/enterprise/magnolia-travel-demo-content-tags/src/main/resources/travel-demo-content-tags/decorations/tours/apps/tours.subApps.detail.yaml?at=master"/><input name="queryString" type="hidden" value="next=/projects/MODULES/repos/demo-projects/raw/enterprise/magnolia-travel-demo-content-tags/src/main/resources/travel-demo-content-tags/decorations/tours/apps/tours.subApps.detail.yaml?at%3Dmaster"/><input class="aui-button aui-button-primary" type="submit" id="submit"  name="submit"  value="Log in" accesskey="s"/><a id="forgot" class="aui-button aui-button-link"  name="forgot" href="/passwordreset" autocomplete="off" tabindex="0">Unable to access your account?</a></div></form></section><!-- .aui-page-panel-content --></div><!-- .aui-page-panel-inner --></div><!-- .aui-page-panel --></section><!-- End #content --><!-- Start #footer --><footer id="footer" role="contentinfo"><section class="notifications"></section><section class="footer-body"><ul><li data-key="footer.license.message">Git repository management for enterprise teams powered by <a href="https://www.atlassian.com/software/bitbucket/">Atlassian Bitbucket</a></li></ul><ul><li>Atlassian Bitbucket <span title="9cff12d7ea476637adec832a01be71e1c2ab1695" id="product-version" data-commitid="9cff12d7ea476637adec832a01be71e1c2ab1695" data-system-build-number="9cff12d"> v7.11.1</span></li><li data-key="footer.links.documentation"><a href="https://docs.atlassian.com/bitbucketserver/docs-0711/Bitbucket+Server+documentation?utm_campaign=in-app-help&amp;utm_medium=in-app-help&amp;utm_source=stash" target="_blank">Documentation</a></li><li data-key="footer.links.jac"><a href="https://jira.atlassian.com/browse/BSERV?utm_campaign=in-app-help&amp;utm_medium=in-app-help&amp;utm_source=stash" target="_blank">Request a feature</a></li><li data-key="footer.links.about"><a href="/about">About</a></li><li data-key="footer.links.contact.atlassian"><a href="https://www.atlassian.com/company/contact?utm_campaign=in-app-help&amp;utm_medium=in-app-help&amp;utm_source=stash" target="_blank">Contact Atlassian</a></li></ul><div id="footer-logo"><a href="https://www.atlassian.com/" target="_blank">Atlassian</a></div></section></footer><!-- End #footer --></div><script>require('bitbucket/internal/layout/base/base').onReady(null, "Magnolia Bitbucket" ); require('bitbucket/internal/widget/keyboard-shortcuts/keyboard-shortcuts').onReady();</script><script type="text/javascript">require('bitbucket/internal/page/login/login').onReady();</script></body></html>

Registering the tours workspace in content-tags configuration

Node nameValue

 taggableWorkspaces

com.example.templates.CustomTemplateDefinition

 tours


 appMapping

app:tours:detail

 workspace

tours

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

Decoration of the browser subapp

/using-content-tags/decorations/contacts/apps/contacts.subApps.browser.yaml
subAppClass: info.magnolia.contenttags.shortcut.TagShortcutAwareBrowserSubApp

actions:
  addTags:
    class: info.magnolia.contenttags.dialog.OpenTagDialogActionDefinition
    icon: icon-tag
    availability:
      multiple: true
      rules:
        - name: IsNotDeletedRule
          implementationClass: info.magnolia.ui.framework.availability.IsNotDeletedRule
      nodeTypes:
        tour: mgnl:contact

actionbar:
  sections:
    contact:
      groups:
        editActions:
          items:
            - name: addTags

workbench:
  contentViews:
    list:
      columns:
        - name: tags
          class: info.magnolia.contenttags.column.TagsColumnDefinition
          propertyName: mgnl:tags
          width: 160
    tree:
      columns:
        - name: tags
          class: info.magnolia.contenttags.column.TagsColumnDefinition
          propertyName: mgnl:tags
          width: 160
    search:
      columns:
        - name: tags
          class: info.magnolia.contenttags.column.TagsColumnDefinition
          propertyName: mgnl:tags
          width: 160

      implementationClass: info.magnolia.contenttags.app.contenttool.search.TagSearchPresenter

Decoration of the detail subapp

/using-content-tags/decorations/contacts/apps/contacts.subApps.detail.yaml
editor:
  form:
    tabs:
      personal:
        fields:
          - name: mgnl:tags
            class: info.magnolia.contenttags.form.field.TagFieldDefinition
            i18n: true

actions:
  commit:
    class: info.magnolia.contenttags.form.action.SaveDialogWithTagsActionDefinition

Registering the contacts workspace in content-tags configuration

Node nameValue

 taggableWorkspaces

com.example.templates.CustomTemplateDefinition

 tours


 contacts


 appMapping

app:contacts:detail

 workspace

contacts

You can clone the Contacts app decoration from our bitbucket.