PHPackages                             biglotteryfund/preview-button - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. biglotteryfund/preview-button

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

biglotteryfund/preview-button
=============================

Adds a preview button to the entry editor screen to allow previewing of draft/revision entries

1.0.4(6y ago)33.9k2[1 PRs](https://github.com/biglotteryfund/craft-preview-button/pulls)MITPHPCI failing

Since Feb 6Pushed 6y agoCompare

[ Source](https://github.com/biglotteryfund/craft-preview-button)[ Packagist](https://packagist.org/packages/biglotteryfund/preview-button)[ RSS](/packages/biglotteryfund-preview-button/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (5)Dependencies (1)Versions (5)Used By (0)

Note: this project is no longer maintained / usable beyond Craft CMS 3.2
------------------------------------------------------------------------

[](#note-this-project-is-no-longer-maintained--usable-beyond-craft-cms-32)

Craft 3.2 saw the release of "[headless preview](https://craftcms.com/blog/craft-32)" which effectively supersedes this plugin. Headless Preview is much more powerful than this plugin, and also makes it no longer work as draft entries are now dynamic (eg. use JavaScript to update the UI), which means our plain-ol' server-rendered button will no longer link to the right place. Our suggestion is to disable this plugin and modify your API calls to pass through the Craft preview tokens (which Just Work™) to your API – there's a good guide here:

Preview Button plugin for Craft CMS 3.x
=======================================

[](#preview-button-plugin-for-craft-cms-3x)

Adds a preview button to the entry editor screen to allow previewing of draft/revision entries

[![Logo](resources/img/logo.png)](resources/img/logo.png)

Requirements
------------

[](#requirements)

This plugin requires Craft CMS 3.0.0-beta.23 or later.

Installation
------------

[](#installation)

To install the plugin, follow these instructions.

1. Open your terminal and go to your Craft project:

    ```
     cd /path/to/project

    ```
2. Then tell Composer to load the plugin:

    ```
     composer require biglotteryfund/preview-button

    ```
3. In the Control Panel, go to Settings → Plugins and click the “Install” button for Preview Button.

Preview Button Overview
-----------------------

[](#preview-button-overview)

Sites that make use of the [Element API](https://github.com/craftcms/element-api) may not benefit from Craft's preview features if they're not making use of templating. This plugin adds a button to the Entry editing screen which links to a preview URL with `?draft=$id` or `?version=$id` parameters so your backend can look up content from the correct place.

It's your responsibility to write the backend code to fetch these revisions/drafts, but this plugin should allow you to give users a way to preview content directly from the editing screen.

Configuring Preview Button
--------------------------

[](#configuring-preview-button)

There are three settings:

[![Logo](resources/img/settings.png)](resources/img/settings.png)

### 1. URL base

[](#1-url-base)

This will replace your `siteUrl` for the entry's URI (eg. you may wish to serve preview content on a subdomain or subfolder of your main site).

### 2. Version URL parameter (optional)

[](#2-version-url-parameter-optional)

This will be appended to the preview URI along with the ID of the version, eg. `?version=$id`.

### 3. Draft URL parameter (optional)

[](#3-draft-url-parameter-optional)

This will be appended to the preview URI along with the ID of the draft, eg. `?draft=$id`.

Using Preview Button
--------------------

[](#using-preview-button)

Install the plugin, configure a URL base as a minimum, and edit an entry in draft/revision mode. You should see a button below the entry fields:

[![Logo](resources/img/preview.png)](resources/img/preview.png)

Preview Button Roadmap
----------------------

[](#preview-button-roadmap)

Possibly supporting more advanced URL construction and configuring which entry types or user roles can see the preview button.

\--

Brought to you by [Big Lottery Fund](https://www.github.com/biglotteryfund)

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 66.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~204 days

Total

4

Last Release

2454d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/394376?v=4)[Matt Andrews](/maintainers/mattandrews)[@mattandrews](https://github.com/mattandrews)

---

Top Contributors

[![mattandrews](https://avatars.githubusercontent.com/u/394376?v=4)](https://github.com/mattandrews "mattandrews (8 commits)")[![davidrapson](https://avatars.githubusercontent.com/u/123386?v=4)](https://github.com/davidrapson "davidrapson (4 commits)")

---

Tags

cmsCraftcraftcmscraft-pluginpreview button

### Embed Badge

![Health badge](/badges/biglotteryfund-preview-button/health.svg)

```
[![Health](https://phpackages.com/badges/biglotteryfund-preview-button/health.svg)](https://phpackages.com/packages/biglotteryfund-preview-button)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

100387.6k58](/packages/verbb-formie)[nystudio107/craft-seomatic

SEOmatic facilitates modern SEO best practices &amp; implementation for Craft CMS 5. It is a turnkey SEO system that is comprehensive, powerful, and flexible.

1741.5M52](/packages/nystudio107-craft-seomatic)[verbb/navigation

Create navigation menus for your site.

92698.4k18](/packages/verbb-navigation)[verbb/field-manager

Manage your fields and field groups with ease.

195612.2k10](/packages/verbb-field-manager)[verbb/workflow

Enforce multi-step review processes for creating entries.

138123.0k1](/packages/verbb-workflow)[verbb/comments

Add comments to your site.

13753.7k](/packages/verbb-comments)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
