Time-based campaign pages using Magnolia's personalization (Part I)

Published on October 14, 2015 by Zak Greant

With Magnolia, it's easy to schedule content to be published at a specific date and time, but what if you need to be able to review and repeatedly revise multiple scheduled versions of a page? Even more, what if you need to be able to see what your site will look like at a given future date?

You could use scheduled publishing for this case, but it would be awkward. For example, if you wanted to update a page already scheduled for publishing then you'd need to delete it from the publishing queue, make your changes, and schedule it for publishing again. If you wanted to schedule multiple versions of the same page, then you'd end up doing extra work recreating your changes each time.

Here's a better way to manage time-based campaign pages using Magnolia's built-in personalization features. If you aren't familiar with the personalization features, you probably want to skim the My first personalized campaign tutorial.

Key benefits for using this method include:

  • Editors can easily work simultaneously on different variants of the same page
  • Each variant of a page has its own revision history
  • Reviewers can easily browse future states of the site (and compare variants of a given page.)
  • Campaign dates can be managed centrally or on a case-by-case basis

The basic method can be set up and demonstrated in a handful of steps.

  1. Open the Pages app in the Magnolia shell
  2. Create one or more variants for an existing page
  3. For each variant, set the audience for the variant, adding:
    • a meaningful name
    • a date trait that covers the dates you want the page to appear live
  4. Edit the variants as you like
  5. Use the "Preview as visitor" feature to see the default state of the page
  6. Set the date trait in the preview to see what the page looks like on that given date
    • Note how you can easily browse around the rest of the site, seeing what it will look like (barring changes to pages without variants) at the time you set in the date trait.

Note: To test this locally, you must be running Magnolia Enterprise Edition with personalization enabled. Alternately, use the online demo.

Here's a demo of the basic steps in a minute-or-so long video. (I used our online demo so that you can easily try for yourself.)


Stay tuned for the next part of this post where I'll talk about advanced use, limitations and more.


{{item.userId}}   {{item.timestamp | timestampToDate}}

About the author Zak Greant

Zak Greant is a writer, programmer and cook with a long history of involvement with the Free Software and Open Source movements. In the past two decades, he's worked with or been a contributor to the PHP project, MySQL AB, the Mozilla Foundation, the Open Source Initiative, the Free Software Foundation, eZ Systems AS, the WikiMedia Foundation, along with various other FLOSS organizations and startups. At Magnolia, he focuses on a wide range of projects from communications and marketing to open source strategy and licensing.

See all posts on Zak Greant