Campaign Publisher module
Content management Bundled: DX Core
Edition |
DX Core |
License |
|
Issues |
|
Maven site |
|
Latest |
2.0.4 |
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.
The Campaign Publisher module and app are compatible with Pages and Assets apps (6 UI). There is an ongoing effort to convert the Campaign Publisher module and app to the entire 6 UI framework. You can follow the progress on the following ticket: MGNLCAMPU-87. |
You can see the state of readiness and publication status of each item, preview items, and publish the whole campaign with a single click.
Installing with Maven
Bundled modules are automatically installed for you.
If the module is unbundled, add the following to your bundle including your project’s <dependencyManagement>
section and your webapp’s <dependencies>
section.
If the module is unbundled but the version is managed by the parent POM, add the following to your webapp’s <dependencies>
section.
<dependency>
<groupId>info.magnolia.campaign</groupId>
<artifactId>magnolia-campaign-publisher</artifactId>
<version>2.0.4</version> (1)
</dependency>
1 | Should you need to specify the module version, do it using <version> . |
Configuration
From 2.0.1, the Add to campaign action is by default available only in UI 6 Pages and Assets apps, but can be added to other content apps as well.
App | Module name | App name | Config source |
---|---|---|---|
old Pages app |
pages |
pages |
|
6 UI Pages app |
pages-app |
pages-app |
|
old Assets app |
dam-app |
assets |
|
6 UI Assets app |
dam-app-core |
dam |
|
Add to campaign action in other content apps
There are two ways of adding the Add to campaign action button to your content app.
The first one is by adding a decoration. In the Resource app, go to /campaign-publisher/decorations/
and add the Add to campaign action decoration.
The second way is by going to the App definition and defining class
under actions
as info.magnolia.campaignpublisher.ui.action.AddCampaignActionDefinition
.
See Action definition and Definition decorator file location articles for more on that.
Add to campaign action in Pages
subApps:
browser:
actions:
selectCampaignAction:
class: info.magnolia.campaignpublisher.ui.action.AddCampaignActionDefinition
actionbar:
sections:
- name: crud
groups:
- name: publish
items:
- name: selectCampaignAction
Add to campaign action in Assets
jcrBrowser:
actions:
selectCampaignAction:
class: info.magnolia.campaignpublisher.ui.action.AddCampaignActionDefinition
actionbar:
sections:
asset:
groups:
publish:
items:
- name: selectCampaignAction
folder:
groups:
publish:
items:
- name: selectCampaignAction
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 Pages and Assets by default, but can be added to any content app.
Creating a campaign
To create a campaign:
-
Open the Campaign Publisher app:
-
Click Add campaign.
-
Name the campaign
-
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:
-
Open the app where the content is managed.
-
Select the content and click Add to campaign. You can add multiple items simultaneously.
-
Select the campaign in the dialog.
-
Check Dependencies to include referenced content such as images or videos used on a page. This option is only available in the Pages app.
-
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
.
Property | Description |
---|---|
|
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. |
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
.
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.
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 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.
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.