Code Monkey home page Code Monkey logo

typo3cms-reference-tsconfig's Introduction

TSconfig Reference

This document describes TSconfig: A TypoScript-like syntax for configuring details of the TYPO3 backend.

In addition, you can find a quick reference guide to TypoScript templates in TypoScript in 45 Minutes, a complete reference of all object types and properties of TypoScript in TypoScript Reference and explanations of TypoScript syntax in the chapter "TypoScript Syntax" of TYPO3 Explained.

Repository:https://github.com/TYPO3-Documentation/TYPO3CMS-Reference-TSconfig
Read online:https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/

typo3cms-reference-tsconfig's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

typo3cms-reference-tsconfig's Issues

Break up page TSconfig mod

The page is extremely long and it is hard to find something.

I would suggest to break it up into single sub pages for each module, the shared and the wizards parts

Overriding Flexform example is wrong: uses extension key with underscore in "plugin signature"

There might be several examples, but I am referring to the example for altLabels, might need to check for more

Current behavior

In the altLabels flexform example, there is most likely an error:

TCEFORM.tt_content.pi_flexform.my_ext_pi1.sDEF.myField.altLabels
should be:

TCEFORM.tt_content.pi_flexform.myext_pi1.sDEF.myField.altLabels

where the "plugin signature" is myext_pi1 and not my_ext_pi1.

I tested this, but in v11. Can verify for v13 as well.

my_ext_pi1 is most likely the "plugin signature" and this is all lowercase with no underscore except for the one underscore separating extension key and plugin name

Expected behavior/output

  • fix the example

Links

TYPO3 versions

  • checked main, probably applies to all

Possible Solution

See above

Additional context

Should check if there are more examples.

Unclear how the RTE (and other properties) are nested

The nesting is only clear from the header levels but this is not clearly visible on the rendered page

For example "allowedClasses" is a subproperty of "proc".

For allowTagsOutside there is an example, where this is clear.

https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/PageTsconfig/Rte.html#allowtags


Possbible solutions

one or more of these could be applied:

  • (additionally), add full path of the property, e.g. proc.allowedClasses
  • if there are only 2 levels list the full path, e.g. proc.allowedClases, instead of listing only the leaf (allowedClasses)
  • split up into individual pages
  • add a toctree on the top

levels:

  • disabled
  • proc
    • allowedClasses
    • allowTags
    • allowTagsOutside
    • blockElementList

How the module signature is constructed for mod. is not explained

https://docs.typo3.org/m/typo3/reference-tsconfig/master/en-us/PageTsconfig/Mod.html

There are only very simple examples on this page which use mod.web_info etc. If you created your own be modules in an extension, it is not so intuitive, what is to be used here.

How is this key constructed, e.g.

  1. MAINMODULEKEY UNDERLINE SUBMODULEKEY), e.g. 'web_info', 'web_layout', 'site_configuration', 'system.config'
  2. MAINMODULEKEY UNDERLINE EXTKEY_IN_CAMEL_CASE SUBMODULEKEY_STARTING_WITH_CAPITAL_LETTER e.g. 'web_FormFormbuilder', is created by using:
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
    'TYPO3.CMS.Form',
    'web',
    'formbuilder',

So in this example, the lowercase 'formbuilder' is converted to CamelCase 'Formbuilder' and the extension key is also converted to CamelCase and directly prepended before the submodule key.

It's weird that in the examples 1️⃣ after the underline, it is all-lowercase, while in 2️⃣, it is CamelCase, this makes it not so intuitive.

I would assume, that the modules for the first case are created with addModule(), while the ones for the second are created with registerModule() (Extbase)

Possibly link to "Naming conventions" and add the information there.

Update Images

Some images are still outdated and should be updates with current LTS version.

Backward compatible global TSconfig doesn't work

The solution suggested here doesn't work for me:

use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;

$versionInformation = GeneralUtility::makeInstance(Typo3Version::class);
// Only include page.tsconfig if TYPO3 version is below 12 so that it is not imported twice.
if ($versionInformation->getMajorVersion() < 12) {
   ExtensionManagementUtility::addPageTSConfig('
      "@import 'EXT:myexample/Configuration/page.tsconfig'"
   ');
}

Before addPageTSConfig is called I get an exception caused by line 3 (version information assignment)

Stack trace:
#0 /home/default/mysite/var/cache/code/di/DependencyInjectionContainer_f20ac9260e6dd54040f800c5ba672a4cc1c3df5f.php(5797): TYPO3\\CMS\\Core\\ServiceProvider::getCacheManager()
#1 /home/default/mysite/vendor/symfony/dependency-injection/Container.php(239): DependencyInjectionContainer_f20ac9260e6dd54040f800c5ba672a4cc1c3df5f->getCacheManagerService()
#2 /home/default/mysite/vendor/symfony/dependency-injection/Container.php(219): Symfony\\Component\\DependencyInjection\\Container->make()
#3 /home/default/mysite/public/typo3/sysext/core/Classes/ServiceProvider.php(352): Symfony\\Component\\DependencyInjection\\Container->get()
#4 /home/default/mysite/var/cache/code/di/DependencyInjectionContainer_f20ac9260e6dd54040f800c5ba672a4cc1c
...', referer: http://mysite.wsl.local:1234/typo3/login?redirect=record_edit&redirectParams=edit%255Btt_content%255D%255B13%255D%3Dedit

Also there are unexpected quote characters in lines 6 and 8. Correct code:

...
   ExtensionManagementUtility::addPageTSConfig(
      "@import 'EXT:myexample/Configuration/page.tsconfig'"
   );
...

Split "->MOD" onto serveral pages

Currently it's hard to get an overview on the possible options for web_layout - you can only browser-search the ->MOD page.

There should be subpages for each module.

options.hideRecords.[table]

I made some tests today with this option because its functionality would be just perfect to my current project.
The problem is that this option is not generic. It works only with the "pages" table and not with any other table what the documentation suggest.
It seems that it was maybe planned as a generic solution, but it is not implemented in the current latest.

I think that the [table] should simply be "pages" as in the example; otherwise it is not correct atm.

Break up TCEform

I would break it up in parts that deal with

  • general
  • select fields
  • flexforms
  • suggest wizards

to create shorter pages and make it easier to find thins

Update documentation to 10.4

For some of the removed options, there is nothing to be found in the changelog. So it should be checked for each option, which TYPO3 version they were last present and if they should be removed or just get a notice, that they are no longer present in the current version.

https://docs.typo3.org/m/typo3/reference-tsconfig/master/en-us/UsingSetting/Index.html

  • addUserTSConfig examples use admPanel options that no longer exist
  • outdated ts condition syntax. The whole „Conditions“ block has to be updated.

https://docs.typo3.org/m/typo3/reference-tsconfig/master/en-us/PageTsconfig/Mod.html

  • add info, that defaultLanguageLabel, defaultLanguageFlag, disableLanguages are obsolete when using Site Configurations. These are only applied for a NullSite (a root page with no site configuration)
  • Note: „defaultLanguageLabel“ has an entry for both SHARED and web_list
  • Remove editFieldsAtATime

https://docs.typo3.org/m/typo3/reference-tsconfig/master/en-us/PageTsconfig/Rte.html

  • Remove dontFetchExtPictures
  • Remove dontRemoveUnknownTags_db
  • Remove keepPDIVattribs
  • Remove plainImageMode

https://docs.typo3.org/m/typo3/reference-tsconfig/master/en-us/UserTsconfig/AdmPanel.html

  • The whole page is outdated. Outdated screenshot and a lot of outdated options.

https://docs.typo3.org/m/typo3/reference-tsconfig/master/en-us/UserTsconfig/Options.html

  • Note that popupWindowSize is removed since 10.0
  • Remove languageOrder

https://docs.typo3.org/m/typo3/reference-tsconfig/master/en-us/UserTsconfig/Setup.html

  • Remove helpText

For a number of options in TCEMAIN (disableHideAtCopy, disablePrependAtCopy) it is possible to use "default" instead of table

Current behavior

Some TCEMAIN options such as disablePrependAtCopy are documented with an example using table, e.g.

TCEMAIN.table.pages.disablePrependAtCopy = 1

https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/PageTsconfig/TceMain.html#pagetcemaintables-disableprependatcopy

Expected behavior/output

But it is also possible to configure this in general using default:

TCEMAIN.default.disablePrependAtCopy = 1

However I did not find this information anywhere on that page or any examples with default.

There is also a general section for table https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/PageTsconfig/TceMain.html#pagetcemain-table-table-name where this is not mentioned either

TYPO3 versions

  • 11-13

Possible Solution

see above:

Remove defaultLanguageFlag etc

Since the introduction of the site configuration these options can only be used in very rare cases. They all bear a warning:

.. warning::

Note that this option has largely been superseded by site configuration since TYPO3 10 and will only
work in the Backend for a "NullSite". For instance a global sysfolder in the page tree without an
attached site configuration. Once a page tree has a site configuration, the default language icon is
set from the site configuration's language settings and this option will have no effect at all.

So maybe we could remove them. These are rare edge cases

Add information for clearCacheCmd

https://docs.typo3.org/m/typo3/reference-tsconfig/master/en-us/PageTsconfig/TceMain.html

  • I found that news has a different way of doing this - but with news doing this is not necessary and perhaps we should add a note that this may not exactly be the "best" practice - and it may depend on the extension?

https://docs.typo3.org/p/georgringer/news/master/en-us/AdministratorManual/BestPractice/ClearCache/Index.html

The problem is you have to add these TSconfig on every page with records manually.

The example about Default page TSconfig does not apply to TYPO3 11

TYPO3CMS-Reference-TSconfig/Documentation/UsingSetting/PageTSconfig.rst

I think this example is outdated:
RTE.default.showButtons = bold
Copy to clipboard
Static page TSconfig included on the parent page

RTE.default.showButtons := addToList(italic)
Copy to clipboard
Finally you get the value “bold,italic”.

TSFE is missing in Page TSconfig reference after v9

https://docs.typo3.org/m/typo3/reference-tsconfig/9.5/en-us/PageTsconfig/Tsfe.html

In any case, either the page should be available or a deprecation notice should be displayed in older versions. I would prefer to actually still have the page in the next version with a notice (but I think this is not current best practice).

The problem is, when searching for example for TSFE (e.g. on external search engines) you get this old v9 page as one of the first hits. There should be at least a notice there and ideally some links. Since TSFE has several context, and probably the least relevant is TSconfig it might also be helpful to link to other places in the documentation with more relevant information on TSFE, like in the disambiguation page on Wikipedia.

If you use the version selector to switch to v10 this page is displayed: https://docs.typo3.org/m/typo3/reference-tsconfig/10.4/en-us/PageTsconfig/

Here, TSFE is not listed.

Is this TSFE configuration still available in v10?

There is a changelog, that TSFE.constants was removed (in v10), but not TSFE itself. (however, TSFE seems to only contain the constants)

https://docs.typo3.org/c/typo3/cms-core/11.5/en-us/Changelog/10.0/Breaking-88564-PageTSconfigSettingTSFEconstantsRemoved.html

Overriding flexform uses a fieldname with no dots, should point out dots need escaping with backslash

Note: will be adding PR, but needs some more research.

Current behavior

For overriding Flexform, there is an example, for example for altLabels:

Flex form field level, example:
TCEFORM.tt_content.pi_flexform.my_ext_pi1.sDEF.myField.altLabels

Expected behavior/output

  • an example with dots in the fieldname and an explanation that they must be escaped
  • also, field names are usually all lowercase

For example, it could look like this:


Flex form field level, example:

# TCEFORM.<table>.pi_flexform.<plugin signature>.<sheet><field name with escaped dots>.altLabels
TCEFORM.tt_content.pi_flexform.my_ext_pi1.sDEF.settings\.myfield.altLabels
  • dots in the field name must be escaped by backslash (because otherwise TSConfig considers them as separators, here the field name is one entity)

Links

TYPO3 versions

  • checked main, applies to all versions

Possible Solution

See above

Documentation claims TCEFORM.[table].[field].disabled renders as readOnly, but actually does not render.

https://docs.typo3.org/m/typo3/reference-tsconfig/9.5/en-us/PageTsconfig/TceForm.html#disabled

Quoting the intro:

If set, the field is rendered, but not editable by the user.

Quoting the code example:

# The title field of the pages table is not editable

However, in reality, TYPO3 returns early without rendering the field, instead of rendering it as readOnly:

https://github.com/TYPO3/typo3/blob/master/typo3/sysext/backend/Classes/Form/Container/SingleFieldContainer.php#L88-L90

CSS: class docutils does not render lilkme tables

I realized that the style for defenitionlist with the class .docutils do not render like "tables" (div class t3-row) for "propertys", "Data type" and "examples".
So please add this CSS to the "theme.css"

dl.docutils{
background-color: #f2ebe3;
border: 1px none #888;
border-top: 2px solid #988d81;
clear: both;
margin-bottom: 30px;
margin-top: 30px;
position:relative;
}
dl.docutils dt{
padding: 12px 8px;
color: #b34700;
font-size: 9px;
font-weight: 400;
}
dl.docutils dd{
padding: 12px 8px;
margin:0;
}

dl.docutils dt:nth-of-type(1){
font-weight: 700;
margin-right: 8px;
min-width: 30%;
margin: 0;
position:absolute;
}

dl.docutils dd:nth-of-type(1){
font-weight:700;
position:absolute;
margin-top:20px;
}

dl.docutils dt:nth-of-type(2){
border-left: 4px solid #fff;
position:relative;
left:30%;
top:0;
}
dl.docutils dd:nth-of-type(2){
border-left: 4px solid #fff;
position:relative;
left:30%;
top:0;
max-width:70%;
}
dl.docutils dt:nth-of-type(3){
border-top: 4px solid #fff;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.