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. 

Installing

Maven is the easiest way to install the module. Add the following to your bundle:

<dependency>
  <groupId>info.magnolia.campaign</groupId>
  <artifactId>magnolia-campaign-publisher</artifactId>
  <version>2.0.4</version>
</dependency>

Pre-built JARs are also available for download. See Installing a module for help.

Configuration

The module is configured in /modules/campaign-publisher.

Node name

 campaign-publisher

 apps

 dialogs

 actions

 commands

 fieldTypes

Creating and managing campaigns

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 PagesAssetsContacts and Configuration apps by default, but can be added to any content app.

Creating a campaign

To create a campaign:

  1. Open the Campaign Publisher app:
  2. Click Add campaign.
  3. Name the campaign 
  4. Save.

Adding content to campaigns

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:

  1. Open the app where the content is managed.
  2. Select the content and click Add to campaign. You can add multiple items simultaneously. 
  3. Select the campaign in the dialog.
  4. Check Dependencies to include referenced content such as images or videos used on a page. This option is only available in the Pages app.
  5. Save.

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.

Managing campaigns

Campaign managers and team members can interact and see the overall state of a campaign in the Campaign Publisher app.

Each item shows:

  • Added by: User who added the item.
  • Ready: Whether the item is ready for publication. 
  • Status: Publication status of the item.
  • Is reference: Whether the item is a referenced (dependent) item or has been added individually.
  • Item type: Whether the item is a page, asset, resource or configuration. The type displays before the path. 
  • Path: Path to the item,
  • Workspace: Workspace where the item is located. This displays after the word "at" at the end or the path.

Campaign actions

The app has a number of custom actions to manage campaigns:

  • Campaign actions:
    • Edit campaign: Opens dialog to rename campaign and archive the campaign on completion.
    • Rename campaign: Opens dialog to rename the campaign. 
    • Delete: Deletes the campaign and all items.
    • Merge campaigns: Merges multiple campaigns into one. Select the campaigns to be merged and click the action. Duplicates are removed automatically.
    • Update dependencies: Refreshes dependent content and adds missing dependencies. The action's confirmation dialog lists the dependencies that will be added or removed. 
    • Include unpublished parents: Adds any unpublished parent items that would prevent publishing the campaign. 
    • Publish: Publishes the entire campaign and all campaign items. Campaigns are automatically marked as ready when all items have been marked as ready. If the campaign is not marked as ready, a warning displays in a confirmation dialog prior to publication. 
    • Unpublish: Unpublishes the campaign and all campaign items.
    • Export/Import: Exports or imports the node in the campaigns workspace to or from XML. The underlying content is not imported or exported.

  • Item actions:
    • Mark/Un-mark as ready: Changes the ready status icon to green (ready) or red (unready). If content marked as ready is modified in the underlying app the status automatically changes to amber (modified). Actions can be executed on multiple items. When all campaign items are marked as ready, the status of the campaign node changes to ready automatically, and vice versa. 
    • Preview: Opens the item in the app where it is managed.
      • Pages open in Preview app
      • Content app items open in the edit dialog in the app where they are managed.
      • Action is not available for items managed in custom apps such as the Tours app
    • Delete: Removes items from the campaign. It does not result in deletion of the actual content. Action can be executed on multiple items.
    • Split campaigns: Splits one campaign into two. Select one or more items to be moved and click the action. A new campaign with the same name plus a prepended numeral is created, and the selected items are moved from the original to the new campaign.
    • Publish/Unpublish: Publishes and unpublishes the underlying content item. Actions can be executed on multiple items.
    • Export/Import: Exports or imports the node in the campaigns workspace to or from XML. The underlying content is not imported or exported.

Add to campaign  action 

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.

availability

optional

Availability node.

nodeTypes

required

Node types node

<node type mappings>

required

Node types the action operates on. One for each type.

rules

optional

Availability rules.

multiple

optional, default is false

Defines whether the action is available for multiple items.

root

optionaldefault is false

Defines whether action is available at the workspace root level.

class

required

Action definition class.

dialogName

optional

Dialog to open when the action is executed.

icon

optional

Action icon.

label

optional

Action label.


Adding Add to campaign action to content apps

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


Here's the action in the Tours app.

The Add to campaign action does not work in the Resource files app.

Setting permissions

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

WorkspacePermissionScopePath
CampaignsRead/WriteSelected 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. 

Here's what example Travel demo tour editor Tina, who does not have access to the Pages app, sees in the Campaign Publisher app. The activation status indicator and Preview action are disabled. 

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))