Skip to content

Repository files navigation

PopupManager

A MODX Revolution extra for creating and managing popups on your website. Build popups directly from the MODX manager with a live preview, flexible styling options, page targeting, and built-in view/click tracking.

Features

  • Create and manage multiple popups
  • Live preview while editing
  • Flexible styling: background color, background image, border radius, button colors and shape
  • Five display positions: center, bottom-right, bottom-left, top-right, top-left
  • Fade and slide animations
  • Optional close button and overlay click-to-close
  • Page targeting — show a popup only on specific resources
  • Date scheduling with start and end date
  • Cookie-based frequency control (hide after closing for X days)
  • View and click tracking with CTR display

Requirements

  • MODX Revolution 3.x
  • PHP 7.4 or higher

Installation

Via MODX Package Manager

  1. Open the MODX manager and go to Extras → Installer.
  2. Search for PopupManager and click Download.
  3. Click Install and follow the setup wizard — the database table and all components are registered automatically.

Usage

Adding the snippet to your template

Place the ShowPopup snippet call in your base template, just before the closing </body> tag:

[[!ShowPopup]]

The snippet is uncached ([[!...]]) so it always checks for an active popup on each page load.

Creating a popup

  1. Go to Extras → Popup Manager in the MODX manager.
  2. Click + New popup.
  3. Fill in the form — the right column shows a live preview that updates as you type.
  4. Click Save.

Form sections

Section Fields
Content Title, content (rich text), button text, button URL
Popup style Background color, background image, border radius
Button style Background color, text color, border radius, alignment
Display Position, animation, cookie duration
Behavior Active toggle, close button, start date, end date
Targeting Limit the popup to specific pages

Positions

Value Description
center Centered overlay with dark backdrop
bottom-right Fixed corner, bottom right
bottom-left Fixed corner, bottom left
top-right Fixed corner, top right
top-left Fixed corner, top left

Page targeting

By default a popup is shown on every page. To restrict it to specific pages, open the Targeting section and add one or more resources using the page picker. The popup will only appear on those pages.

Scheduling

Use the Start date and End date fields to automatically activate or deactivate a popup on a specific date. Leave either field empty for no restriction.

Cookie duration

The Cookie (days) field controls how long a visitor will not see the popup again after closing it. Set to 1 to show it again the next day, or a higher number to suppress it longer.

Tracking

Every time a popup is shown, a view is recorded. Every time the call-to-action button is clicked, a click is recorded. Open a popup in the editor to see the total views, clicks, and CTR.


Troubleshooting

Popup does not appear

  • Check that the popup is set to Active.
  • Check that the current date falls within the start and end date range (or leave both empty).
  • If Targeting is configured, make sure you are on one of the targeted pages.
  • Check for a browser cookie named pm_popup_{id}. Delete it or test in a private/incognito window.
  • Make sure [[!ShowPopup]] is in the template used by the current page.

Views and clicks are not being counted

  • Verify that assets/components/popupmanager/tracker.php is accessible from the browser.
  • Check the browser console for failed network requests to tracker.php.

Author

Hylke — hylke@sterc.nl

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages