Table of Contents
Best practise
- Table garbage collector einrichten: http://typo3.system-testen.de/typo3-sys-log-prufen/
- Scheduler
- Extensionlist updaten
Condition for live environment
[globalVar = TSFE:sys_page|versioningWorkspaceId < 1] config.tx_cooluri_enable = 1 [global]
Kategorie im TSconfig setzen
TCAdefaults.tx_news_domain_model_news.categories = 8
source: https://forum.typo3.org/index.php/t/195629/tx-news-localize-default-category-setting
Caching bei externem ts
- für mehr Informationen über diese Eintellung siehe: http://www.typo3forum.net/forum/typo3-4-x-fragen-probleme/38037-externes-typoscript-aufruf-neu-laden.html
admPanel.override.tsdebug.forceTemplateParsing = 1
Extensions
- coreapi
Conditions for workspaces
[globalVar = TSFE:sys_page|versioningWorkspaceId = 1] page.config.tx_cooluri_enable = 1 [global]
CASE richtig verwenden
tt_content.textpic.20.default {
rendering.ul {
imageRowStdWrap.wrap = |
imageRowStdWrap.insertData = 1
noRowsStdWrap.wrap =
oneImageStdWrap.wrap = |
oneImageStdWrap.insertData = 1
imgTagStdWrap.wrap = |
editIconsStdWrap.wrap = |
captionStdWrap.wrap = |
}
renderMethod >
renderMethod.cObject = CASE
renderMethod.cObject {
key.field = layout
default = TEXT
default.value = singleNoCaption
1 = TEXT
1.value = ul
}
}
Partials
Ich habe das Problem mittlerweile gelöst:
Es gibt zwei Fehlerquellen:
1) Die temp.Variable muss vor dem FLUIDTEMPLATE deklariert und gefüllt werden 2) Die Variablen stehen in den Partials nur dann zur Verfügung, wenn sie als Argument übergeben werden. Dies kann entweder einzeln erfolgen oder für alle mit
<f:render partial="header" arguments="{_all}" />
src: http://www.typo3.net/forum/thematik/zeige/thema/111163/?show=1
section index
Wenn keine Links angezeigt werden, kann folgene Zeile im Setup helfen:
tt_content.menu.20.3.1.sectionIndex.useColPos = -1
get a translated record
there is a bug a several versions, i was working with 6.2, which makes it impossible to get a translated record. there is a hack to make it happen anyway, writing an own function in the repository. Maybe better name would have been 'findTranslationByParentUid'
public function findTranslationByUid($uid){
// dark hack
// https://forge.typo3.org/issues/45873#note-37
$languageField = $GLOBALS['TCA']['tx_frosconconnector_domain_model_sponsor']['ctrl']['languageField'];
unset($GLOBALS['TCA']['tx_frosconconnector_domain_model_sponsor']['ctrl']['languageField']);
// end hack
$query = $this->createQuery();
$query->getQuerySettings()->setRespectSysLanguage(false);
$query->matching(
$query->logicalAnd(
$query->equals('sys_language_uid', 1),
$query->equals('l10n_parent', $uid)
)
);
$results = $query->execute();
// dark hack, part 2
$results->toArray();
$GLOBALS['TCA']['tx_frosconconnector_domain_model_sponsor']['ctrl']['languageField'] = $languageField;
// end hack
return $results;
}
diverses
- Formulare mit DateTime-Objekten: https://github.com/froemken/typo3-extbase-guide/blob/master/Documentation/Fluid/BestPractice/FormsWithDateTimeObjects.rst
- TypoScript to go - TYPO3 für Redakteure: http://www.typo3-fuer-redakteure.de/typoscript-to-go.html
- The TYPO3 CMS version number is defined in file: typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php
Redis backend
<?php $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend'; $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pages']['options'] = array( 'defaultLifetime' => 86400, 'database' => 0 ); $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pagesection']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend'; $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_pagesection']['options'] = array( 'defaultLifetime' => 86400, 'database' => 1 ); $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_hash']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend'; $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['cache_hash']['options'] = array( 'defaultLifetime' => 86400, 'database' => 2 ); $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_object']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend'; $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_object']['options'] = array( 'defaultLifetime' => 86400, 'database' => 3 ); $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_reflection']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend'; $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_reflection']['options'] = array( 'defaultLifetime' => 86400, 'database' => 4 );
Dynamische AdditionalConfiguration.php
vor TYPO3 7
<?php
if (!defined ('TYPO3_MODE')) {
die ('Access denied.');
}
if (strpos($_SERVER['HTTP_HOST'], 'dev.local') !== FALSE) {
$GLOBALS['TYPO3_CONF_VARS']['DB']['database'] = 'database';
$GLOBALS['TYPO3_CONF_VARS']['DB']['host'] = 'localhost';
$GLOBALS['TYPO3_CONF_VARS']['DB']['password'] = 'password';
$GLOBALS['TYPO3_CONF_VARS']['DB']['username'] = 'user';
$GLOBALS['TYPO3_CONF_VARS']['BE']['installToolPassword'] = '$1$T1JapqtV$YgXn4AsCvy2kriRkSJGZr1';
}
Disable Inline Fileupload
UserTS:
setup.override.edit_docModuleUpload=0
