Blaster for Craft CMS

Free · no editions, no licensing code

One sentence, two deploys

A sale that ends Friday. A shipping cut-off. A maintenance window on Sunday night. Every one of them is a line of text that needs to be on every page for four days and then gone — and every one of them ends up as a template edit, a deploy, and a second deploy to take it down again. Blaster makes it a thing you write in the control panel and schedule.

Blaster

Two commands, then nothing

Install it and write a bar. There is no third step — matching bars are spliced into front-end HTML responses before the closing body tag, so no template is touched. If you would rather place them yourself, one tag does that and stands the automatic injection down for that request.

composer require justinholtweb/craft-blaster
php craft plugin/install blaster

{# Nothing needs to go in a template. But if you want it somewhere
   specific, this places the bars and turns injection off for the request: #}
{{ craft.blaster.render() }}

{# And the rest of what Twig gets: #}
{% set bars   = craft.blaster.bars() %}        {# matching this request #}
{% set bar    = craft.blaster.bar('spring-sale') %}
{% set totals = craft.blaster.stats(bar) %}    {# views, clicks, dismissals #}

Features

Everything WPFront Notification Bar keeps behind a licence, and the privacy it does not have.

Targeting, split down the middle

Page, section, entry, site, sign-in state, user group and query string are decided on the server. Device width, referrer and first-versus-returning are decided in the browser.

  • A bar that fails a server rule never reaches the page
  • The browser half is settled after a cached page lands

Your page cache keeps working

Nothing that varies per visitor is decided on the server, so one cached page serves everybody. The server sends every candidate hidden and the browser picks the winner.

  • No cache-busting, no per-visitor render, no session
  • Blitz, Varnish and Cloudflare are all fine with it

Scheduled to the hour

Start and end dates, days of the week, and a daily time window that may run past midnight — all read in the site's own time zone, because that is the one the author was thinking in.

  • The element index shows live, pending, expired or disabled
  • A bar for Friday can be written on Monday and forgotten

Editing it brings it back

Every save bumps the bar's version, and a dismissal is recorded against the version it dismissed. So a change re-shows the bar to everyone who had closed the old wording.

  • Editing a bar is how you say "this is a new thing to say"
  • A stale dismissal is the failure nobody notices in time

Yours to style, down to the CSS

Colours, type size, height, alignment, width, border, shadow and button styling — with a live preview drawn by the same code that serves the front end, and per-bar CSS with a {selector} token for the rest.

  • The preview and the page cannot drift apart
  • Top or bottom, pinned or in-flow, pushing or overlaying

Numbers that describe nobody

Views, clicks, dismissals and a click-through rate — three integers per bar, per site, per day. No event rows, no identifiers, no addresses, no sessions and no cookies.

  • Which answers how many times, never how many people
  • Dismissals live in the visitor's browser and stay there

Frequently Asked Questions

The questions worth answering before you install it.

Write it once, schedule it, forget it

Free, for Craft CMS 5.3 and later. Install it, write a bar, and it is on every page of the site — with no template change and nothing to deploy when it is time for it to go.