Jump to content

Configuration

A guide to configuring site sets, site settings, TypoScript and TCA.

MP-Core logo

Site Sets (TYPO3 13.4+)

SetPurpose
mpc/mp-core (Aggregator)Includes all subordinate feature sets in a single include
mpc/mp-core-base (required)Core functionality, templates, basic styling, shared settings
mpc/mp-core-containerContainer elements (accordion, tabs, sliders, grid)
mpc/mp-core-newsIntegration of the news extension
mpc/mp-core-formConfiguration of the form framework
mpc/mp-core-seoSEO (Open Graph, Twitter Cards, Schema.org, sitemap)

mpc/mp-core is an aggregator that is based on mpc/mp-core-base as well as all functionalities. All you need to do is mpc/mp-core integrate it into your website. If you require fine-tuned control, add mpc/mp-core-base and select individual features.

Set roles

Set a roleRole
mpc/mp-coreAggregator + shared website settings (settings.yaml, settings.definitions.yaml in this folder)
mpc/mp-core-baseLoads TYPO3 system extensions; registers the above paths for shared settings; optional integrations, if available
mpc/mp-core-* (Feature)Feature-specific TypoScript and settings; each dependent on mpc/mp-core-base only
 

Important: When creating a custom site set, you must dependencies: [mpc/mp-core-base, …] — never mpc/mp-core. Establishing dependencies on a child set via the aggregator results in a SetRegistry recursion deadlock.

 

mpc/mp-core-base Dependencies

Required: typo3/form, typo3/redirects, typo3/indexed-search

Optional (used during installation): georgringer/news-recordlinks, georgringer/news-sitemap, mpc/mpc-vidply, mpc/mpc-rss

Enabling sets

Backend: Site management -> Sites -> ‘Sets’ tab -> Enable and organise sets.

YAML (config/sites/[site]/config.yaml):

 
base: 'https://example.com'
rootPageId: 1
dependencies:
  - mpc/mp-core
 

Or select individual sets specifically:

 
dependencies:
  - mpc/mp-core-base
  - mpc/mp-core-container
  - mpc/mp-core-seo
 

Website settings

 

Can be edited via Website Management → Websites → Settings or config/sites/[site]/settings.yaml.

Regenerate after changes settings.definitions.yaml / settings.yaml:

 
node Documentation/scripts/sync-site-settings.mjs
 

Core (shared — mpc/mp-core / registered via mpc/mp-core-base)

Definitions and default values for website settings can be found in Configuration/Sets/mp-core/settings.definitions.yaml and settings.yaml. The base set simply refers to these files.

Source: Configuration/Sets/mp-core/

 

Schema Standarddefault in settings.definitions.yaml (‘Website Settings’ user interface). Default value provided – value from settings.yaml if it overrides the schema (column = as in the schema).

 

PIDs

KeyTypeDefault value
PIDs.pidSearchint0
PIDs.pidHomeint1
PIDs.pidMetaNavTopint66
PIDs.pidMetaNavFooterint25
PIDs.pidMainNavMetaint25
PIDs.pidCategoriesint251
PIDs.pidLogosBannerTopint391
PIDs.pidSupplementint24
PIDs.pidWebFontsint0

Configuration

KeyTypeDefault
config.admPanelboolfalse
config.debugboolfalse
config.noCacheboolfalse
config.removeDefaultJSStringexternal
config.spamProtectEmailAddressesbooltrue
config.spamProtectEmailAddresses_atSubststring[at]
config.absRefPrefixStringauto
config.headerCommentString(empty)

Value

KeyTypeDefault
performance.compressJsboolfalse
performance.compressCssboolfalse
performance.concatenateJsboolfalse
performance.concatenateCssboolfalse
performance.enableLazyLoadingbooltrue
KeyTypeSchema standardDefault setting
navigation.maxDepthint53
navigation.showHiddenPagesboolfalse
navigation.enableBreadcrumbbooltrue

Meta

KeyTypeSchema default valueDefault value
meta.viewportStringwidth=device-width, initial-scale=1
meta.robotsStringindex,follow
meta.appleMobileWebAppCapableStringno
meta.compatibleStringIE=edge
meta.googleStringnotranslate
meta.googleSiteVerificationString(empty)zPXbpegj_B5wbUDB7aXteJbnbT0IPiTDgsP53on-gRA

Templates & Paths

KeyTypeDefault
basePathStringEXT:mp_core
pageTemplatesStringEXT:mp_core/Resources/Private/Templates/Page/
pagePartialsStringEXT:mp_core/Resources/Private/Partials/Page/
pageLayoutsStringEXT:mp_core/Resources/Private/Layouts/Page/
pageFaviconsFileStringEXT:mp_core/Resources/Private/Partials/Page/Favicons.html
contentElementTemplatesStringEXT:mp_core/Resources/Extensions/fluid_styled_content/Private/Templates/
contentElementPartialsStringEXT:mp_core/Resources/Extensions/fluid_styled_content/Private/Partials/
contentElementLayoutsStringEXT:mp_core/Resources/Extensions/fluid_styled_content/Private/Layouts/
containerElementTemplatesStringEXT:mp_core/Resources/Private/Templates/Container/
containerElementPartialsStringEXT:mp_core/Resources/Private/Partials/Container/
containerElementLayoutsStringEXT:mp_core/Resources/Private/Layouts/Container/
pluginsNewsTemplatesStringEXT:mp_core/Resources/Extensions/news/Templates/
pluginsNewsPartialsStringEXT:mp_core/Resources/Extensions/news/Partials/
pluginsNewsLayoutsStringEXT:mp_core/Resources/Extensions/news/Layouts/
pluginsIndexedSearchTemplatesStringEXT:mp_core/Resources/Extensions/indexed_search/Templates/
pluginsIndexedSearchPartialsStringEXT:mp_core/Resources/Extensions/indexed_search/Partials/
pluginsIndexedSearchLayoutsStringEXT:mp_core/Resources/Extensions/indexed_search/Layouts/
contentTypesTemplatesStringEXT:mp_core/Resources/Private/Templates/Content/
contentTypesGalleryTemplatesStringEXT:mp_core/Resources/Private/Templates/Content/
resourcesPrivateStringEXT:mp_core/Resources/Private
resourcesExtensionsStringEXT:mp_core/Resources/Extensions
structuredDataEnabledbooltrue
structuredData.extraEntity.typeStringnone
structuredData.extraEntity.nameString(empty)
structuredData.extraEntity.descriptionString(empty)
structuredData.extraEntity.keywordsString(empty)

Container (mpc/mp-core-container)

Source: Configuration/Sets/mp-core-container/

KeyTypeDefault value
container.grid.enabledbooltrue
container.grid.defaultColumnsint2
container.grid.maxColumnsint4
container.grid.gutterSizeString20px
container.accordion.enabledbooltrue
container.accordion.allowMultipleboolfalse
container.accordion.firstOpenbooltrue
container.tabs.enabledbooltrue
container.tabs.positionStringtop
container.wrapper.maxWidthString1200px
container.wrapper.paddingString15px

Messages (mpc/mp-core-news)

Source: Configuration/Sets/mp-core-news/

KeyTypeDefault
news.list.paginate.itemsPerPageint10
news.list.orderByStringdatetime
news.list.orderDirectionStringdesc
news.list.dateFormatStringd.m.Y
news.list.showCategoriesbooltrue
news.list.showTagsbooltrue
news.detail.showBackLinkbooltrue
news.detail.showRelatedbooltrue
news.detail.relatedLimitint3
news.detail.enableCommentsboolfalse
news.media.maxWidthint1200
news.media.maxHeightint800

Form (mpc/mp-core-form)

Source: Configuration/Sets/mp-core-form/

KeyTypeDefault value
form.honeypot.enabledbooltrue
form.confirmationPage.enabledbooltrue
form.requiredFieldMarkerString*
form.email.senderNameStringWebsite Contact Form
form.email.senderEmailStringnoreply@example.com
form.email.replyToEmailStringinfo@example.com
form.validation.clientSidebooltrue
form.validation.showInlineErrorsbooltrue
form.storage.saveToDatabaseboolfalse
form.storage.uploadFolderString1:/forms/

SEO (mpc/mp-core-seo)

Source: Configuration/Sets/mp-core-seo/

KeyTypeDefault
seo.meta.defaultDescriptionString(empty)
seo.meta.generateDescriptionsbooltrue
seo.meta.maxDescriptionLengthint160
seo.meta.maxTitleLengthint60
seo.meta.titleSeparatorString|
seo.openGraph.enabledbooltrue
seo.openGraph.defaultImagestring(empty)
seo.openGraph.imageWidthint1200
seo.openGraph.imageHeightint630
seo.twitter.enabledbooltrue
seo.twitter.cardTypeStringsummary_large_image
seo.twitter.sitestring(empty)
seo.sitemap.enabledbooltrue
seo.sitemap.excludeHiddenPagesbooltrue
seo.sitemap.priorityString0.5
seo.canonical.enabledbooltrue
seo.schema.enabledbooltrue
seo.schema.organizationTypeStringOrganization
seo.schema.legalNamestring(empty)
seo.schema.alternateNameString(empty)
seo.schema.descriptionString(empty)
seo.schema.foundingDateString(empty)
seo.schema.vatIdString(empty)
seo.schema.taxIdString(empty)
seo.schema.knowsAboutString(empty)
seo.schema.person.jobTitleString(empty)
seo.schema.emailString(empty)
seo.schema.telephoneString(empty)
seo.schema.contactPoint.contactTypeStringcustomer service
seo.schema.contactPoint.telephoneString(empty)
seo.schema.contactPoint.emailString(empty)
seo.schema.contactPoint.areaServedString(empty)
seo.schema.contactPoint.availableLanguageString(empty)
seo.schema.address.streetAddressString(empty)
seo.schema.address.addressLocalityString(empty)
seo.schema.address.postalCodeString(empty)
seo.schema.address.addressRegionString(empty)
seo.schema.address.addressCountryString(empty)
seo.robots.enabledbooltrue
seo.robots.allowAiBotsbooltrue
seo.robots.crawlDelayint0
seo.robots.additionalString(empty)
seo.llmsTxt.enabledbooltrue
seo.llmsTxt.introtext(empty)
seo.llmsTxt.news.storagePidString(empty)
seo.llmsTxt.news.detailPageIdint0
seo.llmsTxt.news.limitint5
 

Using settings in TypoScript

Website settings are defined as simple TypoScript constants under their dotted key (without settings. prefix), e.g. {$navigation.maxDepth}, {$config.admPanel}, {$PIDs.pidWebFonts}. The path settings (pageTemplates, basePath, …) are additionally provided with a settings. prefix, which is why the mpcSitepackage.* path constants must be set to {$settings.pageTemplates}.

For values that need to be resolved at render time (e.g. within config, page.metaor in DataProcessor properties), read them directly via the site:settings.* data getter rather than via a constant:

 
# Flat constant (resolved at TypoScript parse time)
page.10.dataProcessing.110.levels = {$navigation.maxDepth}

# Runtime getter (preferred for config / meta / processor stdWrap)
config.compressJs.data = site:settings.performance.compressJs // {$config.compressJs}
page.meta.robots.data = site:settings.meta.robots
 

Font design tokens are not used via TypoScript: they are generated from the web font data sets (see Web Fonts) WebFontProcessor and as custom CSS properties in Resources/Private/Partials/Page/Styles.html.

Web fonts

Editors can host their own fonts (uploaded to or selected from the file manager) instead of using system fonts. This feature replaces the previous design.fonts.* string settings.

Data model

RecordTablePurpose
Web font familytx_mpcore_domain_model_webfontfamilyA CSS font-family (name + fallback stack), assigned to a target CSS variable
Fonttx_mpcore_domain_model_webfontfaceOne uploaded font file per weight/style (inline child element of a family)

The ‘Applies to’ field for a family assigns it to a custom CSS property:

RoleCSS variable
Body text--bs-body-font-family
Headings--bs-font-sans-serif
Custom CSS variableThe --… Name entered in the family set

Editor workflow

  1. Create a system folder to store the records and set its page ID in the PIDs.pidWebFonts website setting. Leave the setting set to 0 to store the records on the website’s root page.
  2. In the list module for this folder, create a web font family: enter the font family name (e.g. Inter), a fallback stack (e.g. sans-serif) and select ‘Applies to’.
  3. Add one font per weight/style. Upload a file via the file manager or select a woff2 file via the file manager and set the weight (100–900) and style (normal/italic).
  4. Clear the front-end cache. WebFontProcessor This generates the @font-face rules and the :root variable assignments in the nonce-protected inline block <style> block in the page <head>.

rendering pipeline

 
Webfont records (FAL files)
  -> WebFontProcessor (page.headerData.2040.dataProcessing.20)
  -> WebFontCssBuilder (validate + sanitize, build @font-face + :root CSS)
  -> {webFontsCss} in Styles.html
  -> <f:asset.css useNonce="1"> + mpc:format.cssSanitize
 

All values are checked against fixed whitelists in terms of WebFontCssBuilder (weighting, style, font-display, file format, custom variable name, unicode-range), and the family name, fallback and URL are sanitised to remove any characters that might fall outside the scope of the CSS declaration, ensuring that a value provided by an attacker can never be used in the inline <style> .

Restrictions

  • CSP: Self-hosted fonts with fileadmin are ‘Same-Origin’ and are already restricted by font-src 'self' in Configuration/ContentSecurityPolicies.php. To serve fonts from a different domain, that origin must be font-src via a site-specific config/sites/<id>/csp.yaml.
  • Backend permissions: Administrators can edit the entries immediately. Backend groups without administrator rights require tables_modify (and tables_select) for tx_mpcore_domain_model_webfontfamily and tx_mpcore_domain_model_webfontface.
  • A family is only displayed if it contains at least one face with a resolvable font file; otherwise, the :root assignment is skipped (the family name alone would not load anything).

Website configuration (config.yaml)

In addition to the website settings, mp-core extends the website data set and website language by Configuration/SiteConfiguration/Overrides/sites.php. Configure these under ‘Site Management’ → ‘Sites’ → [Site] → ‘Configuration’ (or under config/sites/[site]/config.yaml).

SectionFields (examples)Notes
CustomisationnavType, subnav, subnavOrder, search, copyrightTextnavType: 1 primary, 2 secondary, 3 tertiary
Faviconsfavicon-96x96-png, faviconIco, faviconSvg, apple-touch-icon, webmanifest, …File associations → Resources/Private/Partials/Page/Favicons.html (Favicons & Web App Manifest)
Colours & Stylescolor-toggle, color-1color-8, color-primary, stylesstyles adds custom :root CSS; can be used with ColorPickerValueItems in TCA
Social MediasocialMediaSwitch, fields for platform URLsare converted into SocialMediaProcessor / structured data
LogoslogoBig, logoSmall, logoSvg, logoText, logoTextHiddenLanguage-specific overrides for the website’s languages; implemented via HeaderLogoProcessor
structured data entityextraEntityImageFAL file reference for optional additional Schema.org entity (StructuredDataProcessor); type/name/keywords in the website settings

Language-specific palettes: copyrightText, logo fields and logoText / logoTextHidden may vary depending on the website’s language.

TypoScript structure

 
Configuration/
├── ContentSecurityPolicies.php     # Frontend CSP mutations auto-applied when
│                                   # the `security.frontend.*ContentSecurityPolicy`
│                                   # feature toggle is on (see "Content Security
│                                   # Policy" below)
├── Services.yaml                   # PSR-4 autowiring for `Mpc\MpCore\*`; explicit
│                                   # `public: true` for DataProcessors and the
│                                   # `ColorPickerValueItems` itemsProcFunc; optional
│                                   # `Services.local.yaml` import (see below)
├── Services.local.yaml             # (optional, gitignored) local-only DI overrides
├── Sets/
│   ├── mp-core/
│   │   ├── config.yaml               # Aggregator (depends on all feature sets)
│   │   ├── settings.yaml             # Shared Site Settings defaults
│   │   ├── settings.definitions.yaml # Shared Site Settings schema
│   │   ├── constants.typoscript, setup.typoscript, page.tsconfig
│   ├── mp-core-base/
│   │   └── config.yaml               # System deps + pointers to mp-core settings
│   ├── mp-core-container/
│   │   ├── config.yaml, settings.yaml, settings.definitions.yaml
│   │   ├── constants.typoscript, setup.typoscript
│   ├── mp-core-news/
│   │   ├── config.yaml, settings.yaml, settings.definitions.yaml
│   │   ├── constants.typoscript, setup.typoscript
│   ├── mp-core-form/
│   │   ├── config.yaml, settings.yaml, settings.definitions.yaml
│   │   ├── constants.typoscript, setup.typoscript
│   └── mp-core-seo/
│       ├── config.yaml, settings.yaml, settings.definitions.yaml
│       ├── constants.typoscript, setup.typoscript
├── TypoScript/
│   ├── constants.typoscript, setup.typoscript
│   ├── VueComponents.typoscript
│   ├── Helper/PageClass.typoscript
│   ├── Constants/*.typoscript
│   └── Setup/
│       ├── 10.Config, 20.Page, 30.Page.Styles, 40.Page.Scripts
│       ├── 50.Page.Navigation, 60.Lib, 90.CleanupRTE
│       ├── Page/*.typoscript
│       └── ContentElements/tt_content/*.typoscript
└── Extensions/
    ├── constants.typoscript, setup.typoscript
FilePurpose
10.ConfigBasic TYPO3 configuration (character set, language, cache)
20.PagePage object, template paths, data processors
30.Page.StylesCSS inclusions
40.Page.ScriptsJavaScript inclusions
50.Page.NavigationBundles for conditional navigation
60.LibShared lib.* objects
95.SitePresentationOverridesSocialMediaProcessor, StructuredDataProcessor
ContentElements/tt_content/*Rendering of content elements, HeaderLogoProcessor

Dependency injection (Services.yaml)

Configuration/Services.yaml automatically binds the Mpc\MpCore\* namespace and registers the services that TYPO3 needs to resolve outside the container as public: true:

serviceWhy public: true
Mpc\MpCore\DataProcessing\HeaderLogoProcessorIs used by TypoScript via GeneralUtility::makeInstance()
Mpc\MpCore\DataProcessing\SocialMediaProcessorImmediately
Mpc\MpCore\DataProcessing\StructuredDataProcessorEquivalent
Mpc\MpCore\Middleware\RobotsTxtMiddlewareIs resolved via the DI container from the PSR-15 middleware stack
Mpc\MpCore\Middleware\LlmsTxtMiddlewareEqual
Mpc\MpCore\UserFunc\ColorPickerValueItemsitemsProcFunc Callback

DI overrides that are only valid locally (Services.local.yaml)

The delivered Services.yaml imports an optional sibling file with ignore_errors: not_found, so that projects can register locally scoped services (tooling commands, ad hoc helpers) without modifying the published file or interrupting container compilation if the file is missing:

 
# Configuration/Services.local.yaml  (gitignored)
services:
  Mpc\MpCore\Command\ImportDocumentationCommand:
    tags:
      - { name: console.command, command: 'docsite:import' }
 

Configuration/Services.local.yaml is listed in .gitignore listed for precisely this pattern.

Content Security Policy (ContentSecurityPolicies.php)

Configuration/ContentSecurityPolicies.php contains a strict front-end CSP, which is automatically applied by TYPO3 13.4+ as soon as one of these feature toggles is enabled (System -> Settings -> Feature Toggles):

  • security.frontend.enforceContentSecurityPolicy -- Enforcement mode
  • security.frontend.reportContentSecurityPolicy -- Report-only mode

The included policy modifies the default TYPO3 front-end settings as follows:

DirectiveChangeReason
default-srcSet 'self'Strict basic rule; anything for which there is no specific directive must come from the same source.
script-srcExtend nonceProxyInline <script> Blocks (ThemeInit.html, JSON-LD <script type="application/ld+json">) are enclosed in <f:security.nonce()>.
style-srcExtend nonceProxyinline <style> blocks (colour overrides in Styles.html, element-specific background image in fluid_styled_content/Layouts/Container.html) <f:asset.css useNonce="1">.
img-srcExtend data:‘Allow SCSS-emitted inline SVG fallbacks’ (svg-load) and Base64 placeholders.
font-srcSet 'self'All web fonts are self-hosted at Resources/Public/Fonts/.
connect-srcSet 'self'No XHR/fetch/WebSocket calls outside one’s own origin.
object-srcSet 'none'Block obsolete plugins (<object>, <embed>, <applet>).
base-uriSet 'self'Preventing <base href> injection attacks.
form-actionSet 'self'Form postbacks are restricted to the same origin only.
frame-ancestorsSet 'self'Protection against clickjacking: no cross-origin embedding.

Overrides per website

Operators can configure the policy per website via config/sites/<id>/csp.yaml:

 
inheritDefault: true
mutations:
  - mode: extend
    directive: img-src
    sources: ["https://cdn.example.com"]
  - mode: extend
    directive: form-action
    sources: ["https://newsletter.example.com"]
 

configuration of the trust boundary colour for the website

inline CSS variables in Resources/Private/Partials/Page/Styles.html are now forwarded via the mpc:format.cssColor ViewHelper, which is passed to Mpc\MpCore\Service\CssColorValidator. Only syntactically valid CSS colours (named, #rgb[a], #rrggbb[aa], rgb()/rgba()/hsl()/hsla()) are output; incorrect or attacker-provided website configuration entries are silently discarded, so that they never leave the inline <style> .

The same validator is also used in Mpc\MpCore\UserFunc\ColorPickerValueItems , so that the backend colour picker’s drop-down menu also filters out invalid slots and limits the labels to 200 characters.

Template path configuration

 
page.10 = FLUIDTEMPLATE
page.10 {
  templateRootPaths {
    0 = EXT:mp_core/Resources/Private/Templates/Page/
    10 = {$settings.pageTemplates}
  }
  partialRootPaths {
    0 = EXT:mp_core/Resources/Private/Partials/
    10 = {$settings.pagePartials}
  }
  layoutRootPaths {
    0 = EXT:mp_core/Resources/Private/Layouts/
    10 = {$settings.pageLayouts}
  }
}
 

Path priority: 0 = Core, 10 = Extension, 20+ = Project. Higher numbers take precedence over lower ones.

Overrides by extensions

 
plugin.tx_news.view.templateRootPaths.10 = EXT:mp_core/Resources/Extensions/news/Templates/
plugin.tx_form.view.templateRootPaths.10 = EXT:mp_core/Resources/Extensions/form/Templates/
plugin.tx_indexedsearch.view.templateRootPaths.10 = EXT:mp_core/Resources/Extensions/indexed_search/Templates/
 

Conditional configuration

Navigation bundles depend on the ‘Site Configuration’ field navType (see Configuration/SiteConfiguration/Overrides/sites.php):

navTypeLayout
1Primary navigation
2Secondary navigation
3Tertiary navigation
[traverse(site("configuration"), "navType") == "1"]
  page.includeJSFooter.navigationPrimary = EXT:mp_core/Resources/Public/JavaScripts/navigationPrimary.js
[END]
 

TCA overwrites

Quick overview

FilePurpose
tt_content_00_base.phpWizard for global links, palettes, Vue TodoList CType
tt_content_00_header.phpAdvanced header options
pages.phpFunction button, teaser description, link icon
sys_category.phpAssignment to main category on pages
sys_file_metadata.phpRTE description, accessibility flag
sys_file_reference.phpOutline and download options
sys_template.phpStatic TypoScript registration

Page fields (pages.php)

FieldTypeDescription
newsletterButton to enable/disableNewsletter sign-up field
socialmediaCheckboxSocial media sharing bar
breadcrumbActivation fieldBreadcrumb navigation
headercontainerEnable/disable buttonHeader container layout
teaser_descriptionText fieldTeaser/map description
link_iconFile (SVG)Icon for custom page link
link_icon_backgroundButton to enable/disableIcon background
FieldTypeOptions
tx_link_switchToggle buttonEnable/disable link
tx_linkLink wizardPage, file, URL, record
tx_link_layoutSelectPrimary/secondary/tertiary button, link styles
tx_link_textText inputCustom link text
tx_link_positionSelectCentre, Left, Right

Palette: link_config

Custom content elements

ElementFileDescription
Gallerytt_content_gallery.phpResponsive image galleries + lightbox
Stagett_content_stage.phpHero sections (image/video backgrounds)
Bannerstt_content_banner.phpCustomisable banner sections
Single teasertt_content_singleteaser.phpContent teasers with images/links
Accordiontt_content_accordion.phpCollapsible sections (b13/container)
Tabstt_content_tabs.phpTabs (b13/container)
Sliderstt_content_slider.phpSwiper carousels (b13/container)
Gridtt_content_grid.phpFlexible column layouts (b13/container)
Containertt_content_container.phpGeneric wrapper (b13/container)
To-Do listtt_content_00_base.phpVue.js 3 To-Do List (CType: mpcore_todolist)
Menu subpagestt_content_menu_subpages.phpExtended subpage menu

File metadata / links

TableFieldDescription
sys_file_metadatadescriptionRTE text description
sys_file_metadatais_accessibleAccessibility indicator
sys_file_referenceoutlineShow with border
sys_file_referenceallow_downloadShow download button

Common customisation patterns

Adding a field to an existing element

 
$myColumns = [
    'tx_my_field' => [
        'label' => 'My Field',
        'config' => ['type' => 'input', 'size' => 30],
    ],
];
ExtensionManagementUtility::addTCAcolumns('tt_content', $myColumns);
ExtensionManagementUtility::addToAllTCAtypes('tt_content', 'tx_my_field', 'textmedia', 'after:bodytext');
 

Database schema

Add columns ext_tables.sqland then run ‘Admin Tools’ -> ‘Maintenance’ -> ‘Analyse database structure’.

 
CREATE TABLE tt_content (
    tx_my_field varchar(255) DEFAULT '' NOT NULL
);
 

Tips

  1. Use existing pallets from tt_content_00_base.php and tt_content_00_header.php
  2. Prefix custom fields with tx_ to avoid conflicts
  3. Use ‘LLL:EXT:... references for all labels
  4. Use ‘displayCond for conditional field visibility: 'displayCond' => 'FIELD:my_toggle:=:1'
  5. Use ‘Site Settings’ instead of hard-coded TypoScript values
  6. Observe the path numbering: 0 (Core), 10 (Extension), 20+ (Project)

Further information

Share page