This is an old revision of the document!
Best practise
- Table garbage collector einrichten: http://typo3.system-testen.de/typo3-sys-log-prufen/
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
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
Redis backend
<?php $TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['cache_pages']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend'; $TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['cache_pages']['options'] = array( 'defaultLifetime' => 86400, 'database' => 0 ); $TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['cache_pagesection']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend'; $TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['cache_pagesection']['options'] = array( 'defaultLifetime' => 86400, 'database' => 1 ); $TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['cache_hash']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend'; $TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['cache_hash']['options'] = array( 'defaultLifetime' => 86400, 'database' => 2 ); $TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['extbase_object']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend'; $TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['extbase_object']['options'] = array( 'defaultLifetime' => 86400, 'database' => 3 ); $TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['extbase_reflection']['backend'] = 'TYPO3\\CMS\\Core\\Cache\\Backend\\RedisBackend'; $TYPO3_CONF_VARS['SYS']['caching']['cacheConfigurations']['extbase_reflection']['options'] = array( 'defaultLifetime' => 86400, 'database' => 4 );
Dynamische AdditionalConfiguration.php
vor TYPO3 7
<?php
if (strpos($_SERVER['HTTP_HOST'], 'dev.local') !== FALSE) {
$GLOBALS['TYPO3_CONF_VARS']['DB']['database'] = 'DEV_DB_NAME';
$GLOBALS['TYPO3_CONF_VARS']['DB']['host'] = 'DEV_DB_HOST';
$GLOBALS['TYPO3_CONF_VARS']['DB']['password'] = 'DEV_DB_PASSWORT';
$GLOBALS['TYPO3_CONF_VARS']['DB']['username'] = 'DEV_DB_USER';
}
