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 
- License
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. 
 
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:
- Visit ExtensionManager 
- Switch over to - Get Extensions
- Search for - jar_pretty_preview
- Install extension 
Configuration¶
Just register your pretty preview via TCA override in your extension with the following command:
\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.
\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
 
 
