carbon/previewmodebutton

Toggle preview mode with a button in the Neos CMS backend

Installs: 381

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Language:JavaScript

Type:neos-carbon

0.1.0 2024-04-11 20:11 UTC

This package is auto-updated.

Last update: 2024-11-07 08:32:22 UTC


README

Latest stable version Total downloads License GitHub forks GitHub stars GitHub watchers

Carbon.PreviewModeButton

Toggle preview mode with a button in the Neos CMS backend.

Installation

Carbon.PreviewModeButton is available via packagist. Run the following command in your site package

composer require --no-update carbon/previewmodebutton

Then run composer update in your project root.

Configuration

To add a button into the panel add a configuration like this:

Neos:
  Neos:
    Ui:
      frontendConfiguration:
        "Carbon.PreviewMode:Button":
          # If you set a view mode to true, it will fallback to Neos.Neos:Document and will have no custom icon or label
          rawContent: true

          # The name of the preview mode
          teaserView:
            # If a document is this node type or has this supertype, show the button. Otherwise it will be hidden
            # Defaults to 'Neos.Neos:Document'
            nodeTypeName: "Foo.Bar:Mixin.TeaserDocument"
            # Set the icon. Defaults to 'fas fa-pencil'
            icon: "fas fa-images"
            # Add `aria-label` and `title` to the button. Will be translated, but can also be a plain text
            label: "Foo.Bar:Backend.Main:editPreviewModes.teaserView"
            # Sets the position. Defaults to 'start'
            position: "start 1"