Attention

TYPO3 v7 has reached its end-of-life November 30th, 2018 and is not maintained by the community anymore. Looking for a stable version? Use the version switch on the top left.

There is no further ELTS support. It is recommended that you upgrade your project and use a supported version of TYPO3.

->TCEMAIN

Properties

Property

Data Type

clearCacheCmd

list of values

clearCache_disable

boolean

clearCache_pageGrandParent

boolean

clearCache_pageSiblingChildren

boolean

disableHideAtCopy

boolean

disablePrependAtCopy

boolean

history.maxAgeDays

integer

permissions (user and group)

integer

permissions (actions)

list of strings / integer

preview

array

previewDomain

string

table.[table name]

TCEMAIN_tables

translateToMessage

string

table.[table name]

Property

table.[table name]

default

Data type

TCEMAIN_tables

Description

Options for each table.

permissions (user and group)

Property

permissions.userid

permissions.groupid

Data type

positive integer

Description

Hardcodes the default owner Backend User / Group UID of new and copied pages.

(The default owner is the backend user that creates / copies the record. The default user group is the "main group" of the backend user - the group in the very top of the users group-list.)

Example:

TCEMAIN {
   # Owner be_users UID for new pages:
   permissions.userid = 2
   # Owner be_groups UID for new pages:
   permissions.groupid = 3
}

Backend User with UID 2 is "test" and the Backend Group with UID 3 is "test_group". With the configuration above a new page would be created with this user/group setting instead of the defaults:

Page with altered permissions for backend users and groups

permissions (actions)

Property

permissions.user

permissions.group

permissions.everybody

Data type

(list of strings) / integer (0-31)

Description

Default permissions set for owner-user, owner-group and everybody.

Keylist: show,edit,delete,new,editcontent

Alternatively you can specify an integer from 0 to 31 indicating which bits corresponding to the keylist should be set. (Bits in keylist: show=1,edit=2,delete=4,new=8,editcontent=16)

Defaults from $GLOBALS['TYPO3_CONF_VARS']:

'user' => 'show,edit,delete,new,editcontent',
'group' => 'show,edit,new,editcontent',
'everybody' => ''

Example:

TCEMAIN.permissions {
   # User can do anything (default):
   user = 31
   # Group can do anything
   # (normally "delete" is disabled)
   group = 31
   # Everybody can at least see the page
   # (normally everybody can do nothing)
   everybody = show
}

The page "Community" was created with the settings from the example above. Compared to the two other pages created with default permissions you can see the effect: The Backend Group can now also delete the page by default and Everybody has read access:

Page with altered permissions for backend users, groups and everybody

clearCacheCmd

Property

clearCacheCmd

Data type

List of values (integers, "all", "pages" or tags)

Description

This allows you to have the cache for additional pages cleared when saving to some page or branch of the page tree.

It it possible to trigger clearing of all caches or just the pages cache. It is also possible to target precise pages either by referring to their ID numbers or to tags that are attached to them.

Attaching tags to page cache is described in the TypoScript Reference.

Examples:

# Will clear the cache for page ID 12 and 23
# when saving a record in this page:
TCEMAIN.clearCacheCmd = 12,23
# Will clear all pages cache:
TCEMAIN.clearCacheCmd = pages
# Will clear ALL cache:
TCEMAIN.clearCacheCmd = all
# Will clear cache for all pages tagged with tag "pagetag1"
TCEMAIN.clearCacheCmd = cacheTag:pagetag1

Note

In order for the pages and all commands to work for non-admin users, make sure to set options.clearCache.pages = 1 or options.clearCache.all = 1 accordingly in the user TSconfig.

clearCache_pageSiblingChildren

Property

clearCache_pageSiblingChildren

Data type

boolean

Description

If set, then children of all siblings of a page being edited will have the page cache cleared.

(Default is that when a page record is edited, the cache for itself and siblings (same level) is cleared.)

clearCache_pageGrandParent

Property

clearCache_pageGrandParent

Data type

boolean

Description

If set, then the grand parent of a page being edited will have the page cache cleared.

clearCache_disable

Property

clearCache_disable

Data type

boolean

Description

If set, then the automatic clearing of page cache when records are edited etc. is disabled. This also disables the significance of the two "clearCache_page*" options listed above.

translateToMessage

Property

translateToMessage

Data type

string

Description

Defines the string that will be prepended to every field value if you copy an element to another language version.

The special string "%s" will be replaced with the language title.

Default is "Translate to [language title]:".

Example:

TCEMAIN {
   # Set a German label:
   translateToMessage = Bitte in "%s" übersetzen:
}

preview

Property

preview

Data type

array

Description

Configure preview link generated for the save+view button in Backend. This allows to have different preview URLs depending on the record type. Common usecase is to have previews for blog or news records, but this feature now allows you to define a different preview page for content elements as well, which might be handy if those are stored in a sysfolder.

TCEMAIN.preview {
    <table name> {
        previewPageId = 123
        disableButtonForDokType = 199, 254, 255
        useDefaultLanguageRecord = 0
        fieldToParameterMap {
            uid = tx_myext_pi1[showUid]
        }
        additionalGetParameters {
            tx_myext_pi1.special = HELLO # results in tx_myext_pi1[special]
        }
    }
}

The previewPageId is the uid of the page to use for preview. If this setting is omitted the current page will be used. If the current page is not a normal page, the root page will be chosen.

The disableButtonForDokType setting allows you to disable the preview button for a given list of doktypes. If none are configured, this defaults to: 199, 254, 255 (Spacer, Folder and Recycler).

The useDefaultLanguageRecord defaults to 1 and ensures that translated records will use the uid of the default record for the preview link. You may disable this, if your extension can deal with the uid of translated records.

The fieldToParameterMap is a mapping which allows you to select fields of the record to be included as GET-parameters in the preview link. The key specifies the field name and the value specifies the GET-parameter name.

Finally additionalGetParameters allow you to add arbitrary GET-parameters and even override others.

The core automatically sets the "no_cache" and the "L" parameter. The language matches the language of the current record. You may override each parameter by using the additionalGetParameters configuration option.

previewDomain

Property

previewDomain

Data type

string

Description

Defines a preview domain used for frontend previews triggered from the backend. E.g. "Save and View" button The value must be a valid domain, optionally prefixed by a schema.

Examples:

TCEMAIN.previewDomain = example.localhost
TCEMAIN.previewDomain = http://example.localhost
TCEMAIN.previewDomain = https://example.org

Note

If the option is not specified, the first available domain record within the current rootline is used. Moverover, if no domain record is present either, the current domain (and schema) used for the backend will be chosen.

[page:TCEMAIN]

TCEMAIN_tables sub-properties

Processing options for tables configured via $GLOBALS['TCA'].

disablePrependAtCopy

Property

disablePrependAtCopy

Data type

boolean

Description

Disables the "prependAtCopy" feature (if configured for the table in $GLOBALS['TCA']).

Note

The word "prepend" is misguiding. The "(copy)" label is actually appended to the record title

Example:

TCEMAIN.table.pages {
   # Pages will *not* have "(copy)" appended:
   disablePrependAtCopy = 1
   # Pages will *not* be hidden upon copy:
   disableHideAtCopy = 1
}

These settings adjust that a page which is copied will neither have "(copy X)" appended nor be hidden.

The last page in this tree, labeled "Test", is used as original to be copied.

The first sub page was copied using the settings from the above example: It is labeled "Test" and is visible exactly like the original page.

The page "Test (copy 2)" in the middle was in contrast copied in default mode: The page is hidden and the "(copy X)" suffix is added, if another page with the same named existed already.

Hidden page with added suffix after copying its original page

disableHideAtCopy

Property

disableHideAtCopy

Data type

boolean

Description

Disables the "hideAtCopy" feature (if configured for the table in $GLOBALS['TCA']).

For an example, see disablePrependAtCopy above.