Magnolia 6.0 reached end of life on June 26, 2019. This branch is no longer supported, see End-of-life policy.
The Campaign Publisher module allows you to manage all elements of a campaign in one app. Create a campaign and add pages and other dependent content such as assets and configuration into the campaign. You can see the state of readiness and activation status of each item, preview items, and publish the whole campaign with a single click.
<dependency> <groupId>info.magnolia.campaign</groupId> <artifactId>magnolia-campaign-publisher</artifactId> <version>2.0.4</version> </dependency>
The module is configured in /modules/campaign-publisher
.
Node name |
---|
campaign-publisher |
apps |
dialogs |
actions |
commands |
fieldTypes |
Campaigns are created and managed in the Campaign publisher app. Campaign content is added to campaigns in the app in which the content is managed. The Add to campaign action is available in the Pages, Assets, Contacts and Configuration apps by default, but can be added to any content app.
To create a campaign:
Content is added to campaigns in the app where the content is managed, such as the Pages, Assets, Contacts or Configuration apps. The same content can be added to multiple campaigns.
To add content to campaigns:
You can also create a new campaign on-the-fly while adding content to campaigns. Select <Create new>
in the Add to campaign dialog. A new campaign named after the content item will be created in the Campaign Publisher app and the item and referenced content (if any) will simultaneously be added to the campaign.
Campaign managers and team members can interact and see the overall state of a campaign in the Campaign Publisher app.
Each item shows:
The app has a number of custom actions to manage campaigns:
campaigns
workspace to or from XML. The underlying content is not imported or exported.campaigns
workspace to or from XML. The underlying content is not imported or exported.The module includes a preconfigured Add to campaign action that you can add to any content app. See action definition for more.
The action is configured in /modules/campaign-publisher/actions/selectCampaignAction
.
Node name | Value |
---|---|
campaign-publisher | |
actions | |
selectCampaignAction | |
availability | |
nodeTypes | |
asset | mgnl:asset |
configuration | mgnl:contentNode |
content | mgnl:page |
folder | mgnl:folder |
templateOrResource | mgnl:content |
rules | |
multiple | true |
root | false |
class | info.magnolia.campaignpublisher.ui.action.OpenMultiEditDialogAction$Definition |
dialogName | campaign-publisher:addToCampaign |
icon | icon-add-folder |
label | campaign-publisher.actions.selectCampaignAction.label |
Properties:
selectCampaignAction | required Action name. |
| optional Availability node. |
| required Node types node |
| required Node types the action operates on. One for each type. |
| optional Availability rules. |
| optional, default is Defines whether the action is available for multiple items. |
| optional, default is Defines whether action is available at the workspace root level. |
| required Action definition class. |
| optional Dialog to open when the action is executed. |
| optional Action icon. |
| optional Action label. |
The easiest way to make the Add to campaign action available in a content app is to extend the Addtocampaignaction in the module.
Example: Adding selectCampaignAction
to tours
app in /modules/tours/apps/tours/subapps/browser/actions
.
Node name | Value |
---|---|
tours | |
apps | |
tours | |
subapps | |
browser | |
actions | |
selectCampaignAction | |
extends | /modules/campaign-publisher/actions/selectCampaignAction |
Next, make the action available in the action bar.
Example: Making selectCampaignAction
available in the item
section of the action bar in /modules/tours/apps/tours/subapps/browser/actionbar/sections/item/groups/activationActions
. See Action bar definition for more.
Node name | Value |
---|---|
browser | |
actionbar | |
sections | |
... | |
item | |
groups | |
... | |
activationActions | |
items | |
activate | |
deactivate | |
selectCampaignAction |
The Add to campaign action does not work in the Resource files app.
The Campaign Publisher app belongs to the Edit app group that has no restrictive permissions configured in the app launcher layout.
To add content to campaigns to campaigns and creating and managing campaigns in the Campaign Publisher app, editors and publishers need read/write permissions in the campaigns
workspace. Only superuser
has these permissions by default.
To provide users with the required permissions, create a new role in the Security app with the permissions in the table below and assign it to the user or group.
Access control lists
Workspace | Permission | Scope | Path |
Campaigns | Read/Write | Selected and sub nodes | / |
If permissions to the underlying content are restricted, the user will still not be able to access or preview the content in the app in which the content is managed.