Pretty Preview

Version:1.0
Language:en
Description:Generates an automatic pretty preview of content elements in the backend based on the TCA fields.
Authors:Julian Lichte, Maurice Möllmer
Email:info@invokable.gmbh
License:Creative Commons BY 4.0

What does it do?

  • When building individual content elements, a nice backend preview often falls by the wayside (due to budget or time). The editors have to deal with this, as they are overwhelmed by gray boxes with one-liners in the backend.
  • With this extension you can generate a nice preview of (almost) any content element within a very short time.
  • How does it works?
    • Pretty Preview loads the underlaying data and TCA structure and generates a preview based on the visible and filled fields for the current user.

Example

Before:

Before using Pretty Preview

After:

After using Pretty Preview

Installation

Composer

You can install jar_pretty_preview with following shell command:

composer req jar/jar_pretty_preview

Extensionmanager

If you want to install jar_pretty_preview traditionally with Extensionmanager, follow these steps:

  1. Visit ExtensionManager
  2. Switch over to Get Extensions
  3. Search for jar_pretty_preview
  4. Install extension

Configuration

Just register your pretty preview via TCA override in your extension with the following command:

EXT:your_extension/Configuration/TCA/Overrides/tt_content.php
\Jar\PrettyPreview\Utilities\PreviewUtility::registerContentElement(
   <CType>,
   <configuration>
);
CType
Required:true
Type:string

The CType of your content element.

configuration
Required:false
Type:array

You are able to configure the following options:

Tip

For white- and blacklisting columns, you can use wildcards like “?” and “*”. So instead of define table_class, table_caption, table_delimiter, table_enclosure, ... specificly, you can use table_*.

tableColumnWhitelist
Required:false
Type:array

List of table specific columns which aren’t processed, grouped by table.

tableColumnBlacklist
Required:false
Type:array

List of tables columns which should be processed exclusively, grouped by table.

nestingDepth
Required:false
Type:integer

Depth of displayed subrelations to other table records.

Example:

We want to pretty preview the “table” content element, but just want to preview the content of all fields starting with table_* and bodtext without table_delimiter and table_enclosure.

Example of EXT:your_extension/Configuration/TCA/Overrides/tt_content.php
\Jar\PrettyPreview\Utilities\PreviewUtility::registerContentElement('table', [
   'tableColumnWhitelist' => [
      'tt_content' => ['table_*', 'bodytext']
   ],
   'tableColumnBlacklist' => [
      'tt_content' => ['table_delimiter', 'table_enclosure']
   ],
   'nestingDepth' => 2,
]);

TYPO3

The content of this document is related to TYPO3 CMS, a GNU/GPL CMS/Framework available from typo3.org .

Extension Manual

This documentation is for the TYPO3 extension Pretty Preview. If you find an error or something is missing, please: Report a Problem

Author

This extension has been created by JAR Media, a brand of invokable.

JAR Media - be creative. and relax _images/spacerblock_40x40.png invokable GmbH