Issue Feature Under Review Stale

#102685Add PreviewRenderer for plugins

Torben Hansen 12/16/23, 12:07 updated 09/08/26, 21:46

Description

The core misses a PreviewRenderer class with helper functions, so extension authors can create nice looking plugin previews in the TYPO3 backend. Over the past few years, some 3rd party extensions (e.g. ext:news) have more or less introduced a standard on how plugin previews for plugins could look like.

The idea behind this feature is to add common functionality into one abstract class, which extension authors can extend in order to create plugin previews.

If the feature is available, existing plugin in TYPO3 core (e.g. ext:felogin or ext:form) could get a plugin preview, which shows configured values as preview.

This is a FlexForm xml to try it out for felogin (typo3/sysext/felogin/Configuration/FlexForms/Login.xml):

<settings.categories>
    <label>My categories</label>
    <config>
        <type>category</type>
    </config>
</settings.categories>
<settings.country>
    <label>My country</label>
    <config>
        <type>country</type>
    </config>
</settings.country>
<settings.radio>
    <label>My radio</label>
    <config>
        <type>radio</type>
        <items>
            <numIndex index="0">
                <label>foo</label>
                <value>1</value>
            </numIndex>
            <numIndex index="1">
                <label>bar</label>
                <value>2</value>
            </numIndex>
        </items>
    </config>
</settings.radio>
<settings.datetime_date>
    <label>My datetime (format: date)</label>
    <config>
        <type>datetime</type>
        <format>date</format>
    </config>
</settings.datetime_date>
<settings.datetime_datetime>
    <label>My datetime (format: datetime)</label>
    <config>
        <type>datetime</type>
        <format>datetime</format>
    </config>
</settings.datetime_datetime>
<settings.datetime_time>
    <label>My datetime (format: time)</label>
    <config>
        <type>datetime</type>
        <format>time</format>
    </config>
</settings.datetime_time>
<settings.datetime_datetimesec>
    <label>My datetime (format: datetimesec)</label>
    <config>
        <type>datetime</type>
        <format>datetimesec</format>
    </config>
</settings.datetime_datetimesec>
<settings.color>
    <label>My color</label>
    <config>
        <type>color</type>
    </config>
</settings.color>
<settings.uuid>
    <label>My uuid</label>
    <config>
        <type>uuid</type>
    </config>
</settings.uuid>
<settings.link>
    <label>My link</label>
    <config>
        <type>link</type>
    </config>
</settings.link>
<settings.email_link>
    <label>My email_link</label>
    <config>
        <type>link</type>
    </config>
</settings.email_link>
<settings.email>
    <label>My email</label>
    <config>
        <type>email</type>
    </config>
</settings.email>
<settings.file>
    <label>My file</label>
    <config>
        <type>file</type>
    </config>
</settings.file>
<settings.folder>
    <label>My folder</label>
    <config>
        <type>folder</type>
    </config>
</settings.folder>
<settings.group>
    <label>My group</label>
    <config>
        <type>group</type>
        <allowed>pages</allowed>
        <size>3</size>
        <minitems>0</minitems>
    </config>
</settings.group>
<!--does not work??? <settings.image_manipulation>
    <label>My imageManipulation</label>
    <config>
        <type>imageManipulation</type>
        <file_field>group_db_1</file_field>
    </config>
</settings.image_manipulation>-->
<settings.inline>
    <label>My inline</label>
    <config>
        <type>inline</type>
        <foreign_table>tx_styleguide_inline_1n_inline_1_child</foreign_table>
        <foreign_field>parentid</foreign_field>
        <foreign_table_field>parenttable</foreign_table_field>
        <appearance>
            <showSynchronizationLink>1</showSynchronizationLink>
        </appearance>
    </config>
</settings.inline>
<settings.json>
    <label>My json</label>
    <config>
        <type>json</type>
    </config>
</settings.json>
<settings.language>
    <label>My language</label>
    <config>
        <type>language</type>
    </config>
</settings.language>
<settings.number>
    <label>My number</label>
    <config>
        <type>number</type>
    </config>
</settings.number>
<settings.password>
    <label>My password</label>
    <config>
        <type>password</type>
        <fieldControl>
            <passwordGenerator>
                <renderType>passwordGenerator</renderType>
            </passwordGenerator>
        </fieldControl>
    </config>
</settings.password>
<settings.slug>
    <label>My slug</label>
    <config>
        <type>slug</type>
        <generatorOptions>
            <fields>
                <input_1>1</input_1>
            </fields>
        </generatorOptions>
    </config>
</settings.slug>
<settings.rte>
    <label>My rte</label>
    <config>
        <type>text</type>
        <enableRichtext>1</enableRichtext>
    </config>
</settings.rte>
<settings.codeEditor>
    <label>My codeEditor</label>
    <config>
        <type>text</type>
        <renderType>codeEditor</renderType>
    </config>
</settings.codeEditor>

Preview: Auswahl_024.png

Reviews 1

History 739

Show 114 earlier messages