plugin

This is used for extensions in TYPO3 set up as frontend plugins. Typically you can set configuration properties of the plugin here. Say you have an extension with the key "myext" and it has a frontend plugin named "tx_myext_pi1" then you would find the TypoScript configuration at the position plugin.tx_myext_pi1 in the object tree!

Most plugins are USER and USER_INT objects which means that they have at least 1 or 2 reserved properties. Furthermore this table outlines some other default properties. Generally system properties are prefixed with an underscore:

Properties for all frontend plugin types

userFunc

userFunc

userFunc
Type
(array of keys)

Property setting up the USER and USER_INT object of the plugin.

_CSS_DEFAULT_STYLE

_CSS_DEFAULT_STYLE

_CSS_DEFAULT_STYLE
Type
string / stdWrap

Use this to have some default CSS styles inserted in the header section of the document. _CSS_DEFAULT_STYLE outputs a set of default styles, just because an extension is installed. Most likely this will provide an acceptable default display from the plugin, but should ideally be cleared and moved to an external stylesheet.

This value is read by the frontend RequestHandler script when collecting the CSS of the document to be rendered.

This is for example used by frontend and indexed_search. Their default styles can be removed with:

EXT:site_package/Configuration/TypoScript/setup.typoscript
plugin.tx_frontend._CSS_DEFAULT_STYLE >
plugin.tx_indexedsearch._CSS_DEFAULT_STYLE >
Copied!

However, you will then have to define according styles yourself.

_CSS_PAGE_STYLE

_CSS_PAGE_STYLE

_CSS_PAGE_STYLE
Type
string

_CSS_PAGE_STYLE is included only on the affected pages. Depending on your configuration it will be written in an external file and included on the page or directly added as inline CSS block. Compression for page specific CSS also depends on the global config.compressCss setting.

This setting can be used to only include the CSS when the plugin of a certain extension is included on that page.

This value is read by the frontend RequestHandler when collecting the CSS of the document to be rendered.

_DEFAULT_PI_VARS.[piVar-key]

_DEFAULT_PI_VARS.[piVar-key]

_DEFAULT_PI_VARS.[piVar-key]
Type
string / stdWrap

Allows you to set default values of the piVars array which most plugins are using (and should use) for data exchange with themselves.

This works only if the plugin calls $this->pi_setPiVarDefaults().

The values have stdWrap, which also works recursively for multilevel keys.

Example

EXT:site_package/Configuration/TypoScript/setup.typoscript
plugin.tt_news._DEFAULT_PI_VARS {
    year.stdWrap.data = date:Y
}

This sets the key "year" to the current year.
Copied!

_LOCAL_LANG.[lang-key].[label-key]

_LOCAL_LANG.[lang-key].[label-key]

_LOCAL_LANG.[lang-key].[label-key]
Type
string

Can be used to override the default language labels for the plugin. The 'lang-key' setup part is 'default' for the default language of the website or the 2-letter (ISO 639-1) code for the language. 'label-key' is the 'trans-unit id' xml value in the XLF language file which resides in the path Resources/Private/Language of the extension or in the typo3conf/l10n/[lang-key] (var/labels/[lang-key] in composer mode) subfolder of the TYPO3 root folder. And on the right side of the equation sign '=' you put the new value string for the language key which you want to override.

Example

EXT:site_package/Configuration/TypoScript/setup.typoscript
plugin.tx_myext_pi1._LOCAL_LANG.de.list_mode_1 = Der erste Modus
Copied!

All variables, which are used inside an extension with $this->pi_getLL('list_mode_1', 'Text, if no entry in locallang.xlf', true); can that way be overwritten with TypoScript. The locallang.xlf file in the plugin folder in the file system can be used to get an overview of the entries the extension uses.

Properties for all frontend plugins based on Extbase

Features

Activate features for Extbase or a specific plugin.

features.skipDefaultArguments

features.skipDefaultArguments

features.skipDefaultArguments
Type
boolean
Default
false

Only for Extbase plugins. Skip default arguments in URLs. If a link to the default controller or action is created, the parameters are omitted.

Example

EXT:blog_example/Configuration/TypoScript/setup.typoscript
plugin.tx_blogexample_rssfeed {
    features {
        skipDefaultArguments = 1
    }
}
Copied!

features.ignoreAllEnableFieldsInBe

Deprecated since version 12.4 See :ref:`setup-plugin-features-ignoreAllEnableFieldsInBe-migration`

features.ignoreAllEnableFieldsInBe

features.ignoreAllEnableFieldsInBe
Type
boolean
Default
false

Only for Extbase plugins. Ignore the enable fields in backend.

Example

EXT:blog_example/Configuration/TypoScript/setup.typoscript
plugin.tx_blogexample_admin {
  features {
    ignoreAllEnableFieldsInBe = 1
  }
}
Copied!

Persistence

Settings, relevant to the persistence layer of Extbase.

persistence.enableAutomaticCacheClearing

persistence.enableAutomaticCacheClearing

persistence.enableAutomaticCacheClearing
Type
boolean
Default
true

Only for Extbase plugins. Enables the automatic cache clearing when changing data sets (see also Caching).

Example: Disable automatic cache clearing for Extbase plugin

EXT:blog_example/Configuration/TypoScript/setup.typoscript
plugin.tx_blogexample_admin {
    persistence {
        enableAutomaticCacheClearing = 0
    }
}
Copied!

persistence.storagePid

persistence.storagePid

persistence.storagePid
Type
string (comma separated list of integers)

Only for Extbase plugins. List of page IDs, from which all records are read.

Example: Set storage PID for Extbase plugin

EXT:blog_example/Configuration/TypoScript/setup.typoscript
plugin.tx_blogexample {
    persistence {
        storagePid = 42
    }
}
Copied!

persistence.recursive

persistence.recursive

persistence.recursive
Type
integer

Only for Extbase plugins. Number of sub-levels of the storagePid are read.

Example: Fetch records recursively from storage folder

EXT:blog_example/Configuration/TypoScript/setup.typoscript
plugin.tx_blogexample {
    persistence {
        # Includes 4 sub-levels of the storagePid
        recursive = 4
    }
}
Copied!

View

View and template settings.

All root paths are defined as an array which enables you to define multiple root paths that will be used by Extbase to find the desired template files.

The root paths work just like the one in the FLUIDTEMPLATE.

Example: Set template paths for Extbase plugin

EXT:blog_example/Configuration/TypoScript/setup.typoscript
plugin.tx_blogexample {
    view {
        layoutRootPaths {
            0 = EXT:blog_example/Resources/Private/Layouts/
            10 = EXT:my_extension/Resources/Private/Layouts/
        }
        partialRootPaths {
            0 = EXT:blog_example/Resources/Private/Partials/
            10 = EXT:my_extension/Resources/Private/Partials/
        }
        templateRootPaths {
            0 = EXT:blog_example/Resources/Private/Templates/
            10 = EXT:my_extension/Resources/Private/Templates/
        }
    }
}
Copied!

view.layoutRootPaths

view.layoutRootPaths.[array]

view.layoutRootPaths.[array]
Type
string

Only for Extbase plugins. This can be used to specify the root paths for all Fluid layouts. If nothing is specified, the path EXT:my_extension/Resources/Private/Layouts is used.

view.partialRootPaths

view.partialRootPaths.[array]

view.partialRootPaths.[array]
Type
string

Only for Extbase plugins. This can be used to specify the root paths for all Fluid partials. If nothing is specified, the path EXT:my_extension/Resources/Private/Partials is used.

view.templateRootPaths

view.templateRootPaths.[array]

view.templateRootPaths.[array]
Type
string

Only for Extbase plugins. This can be used to specify the root paths for all Fluid templates in this plugin. If nothing is specified, the path EXT:my_extension/Resources/Private/Templates is used.

view.pluginNamespace

view.pluginNamespace.[array]

view.pluginNamespace.[array]
Type
string

This can be used to specify an alternative namespace for the plugin. Use this to shorten the Extbase default plugin namespace or to access arguments from other extensions by setting this option to their namespace.

MVC

These are useful MVC settings about error handling:

mvc.callDefaultActionIfActionCantBeResolved

mvc.callDefaultActionIfActionCantBeResolved

mvc.callDefaultActionIfActionCantBeResolved
Type
boolean
Default
false

Only for Extbase plugins. If set, causes the controller to show its default action if the called action is not allowed by the controller.

Example: Call default action if action cannot be resolved

EXT:blog_example/Configuration/TypoScript/setup.typoscript
plugin.tx_blogexample {
    mvc {
        callDefaultActionIfActionCantBeResolved = 1
    }
}
Copied!

mvc.throwPageNotFoundExceptionIfActionCantBeResolved

mvc.throwPageNotFoundExceptionIfActionCantBeResolved

mvc.throwPageNotFoundExceptionIfActionCantBeResolved
Type
boolean
Default
false

Same as mvc.callDefaultActionIfActionCantBeResolved but this will raise a "page not found" error.

Example: Show 404 (page not found) page if action cannot be resolved

EXT:blog_example/Configuration/TypoScript/setup.typoscript
plugin.tx_blogexample {
    mvc {
        throwPageNotFoundExceptionIfActionCantBeResolved = 1
    }
}
Copied!

Format

format

format
Type
string
Default
html

Define the default file ending of the template files. The template files have to take care of creating the desired format output.

Example: Define alternative output formats for RSS feeds

EXT:blog_example/Configuration/TypoScript/setup.typoscript
plugin.tx_blogexample_rssfeedxml {
    // Use template List.xml
    format = xml
}
plugin.tx_blogexample_rssfeedatom {
    // Use template List.atom
    format = atom
}
Copied!

Settings

Here reside are all the settings, both extension-wide and plugin-specific. These settings are available in the controllers as the array variable $this->settings and in any Fluid template with {settings}.

The settings for a specific plugin can be overridden by FlexForm values of the same name.