composer
27. December 2019
composer create-project typo3/cms-base-distribution my-new-project ^9.5
composer require vendorname/extension
composer dump-autoload
debug function for extension development
7. July 2017
\TYPO3\CMS\Core\Utility\DebugUtility::debug($varToDebug);
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($varToDebug);
use TYPO3\CMS\Extbase\Persistence\Generic\Storage\Typo3DbQueryParser;
$queryParser = $this->objectManager->get(Typo3DbQueryParser::class);
DebuggerUtility::var_dump(
$queryParser->convertQueryToDoctrineQueryBuilder($query)->getSQL()
);
redirect to https
23. September 2016
RewriteCond %{SERVER_PORT} !^443$ RewriteRule (.*) https://%{HTTP_HOST}/$1 [L]
get TYPO3 from shell or copy from local
25. May 2016
wget http://prdownloads.sourceforge.net/typo3/blankpackage-7.6.x.tar.gz
wget http://prdownloads.sourceforge.net/typo3/typo3_src-7.5.x.tar.gz
scp typo3_src-x.x.x.tar.gz sshuser@xxxx.xx:folder/
patch -p1 < XXX.diff
choose controller action with flexform (switchableControllerActions)
27. April 2016
<?xml version="1.0" encoding="UTF-8"?> <T3DataStructure> <sheets> <general> <ROOT> <TCEforms> <sheetTitle>XXX</sheetTitle> </TCEforms> <type>array</type> <el> <switchableControllerActions> <TCEforms> <label>Views</label> <onChange>reload</onChange> <config> <type>select</type> <items type="array"> <numIndex index="1" type="array"> <numIndex index="0">First view</numIndex> <numIndex index="1">Controller->action;Controller->actionFromExtLocalconf1;Controller->actionFromExtLocalconf2; </numIndex> </numIndex> <numIndex index="2" type="array"> <numIndex index="0">Second view</numIndex> <numIndex index="1">Controller->action1</numIndex> </numIndex> </items> </config> </TCEforms> </switchableControllerActions> </el> </ROOT> </general> </sheets> </T3DataStructure>
configuration from ext_localconf.php will be overwritten! If you need it, put it like line20 after “;”
Flexform for extbase extension
26. April 2016
$extensionName = strtolower(\TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($_EXTKEY)); $pluginName = strtolower('Pluginname'); $pluginSignature = $extensionName.'_'.$pluginName; /** * Disable non needed fields in tt_content */ $TCA['tt_content']['types']['list']['subtypes_excludelist'][$pluginSignature] = 'layout,select_key,pages,recursive'; $TCA['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform'; \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue($pluginSignature, 'FILE:EXT:'.$_EXTKEY . '/Configuration/FlexForms/flexform.xml');
different Body-tag with class and id for every page
16. November 2015
page { bodyTag > bodyTagCObject = TEXT bodyTagCObject.stdWrap.dataWrap = <body class="layout-{field:layout}" id="page-{field:uid}"> }
Customize content header
17. September 2015
Include it in your Page-TypoScript:
# Own headers layouts # *********************************************** lib.stdheader > lib.stdheader = CASE lib.stdheader { key.field = header_layout # DEFAULT H1 (0) default = TEXT default.field = header default.wrap = <h1>|</h1> default.typolink { parameter.insertData = 1 parameter = {field:header_link} } #H2 link to top (1) 1 = TEXT 1.field = header 1.wrap = <h2 class="topLinkHead"> | <a class="topLink" title="to top" href="#container"><img width="9" height="11" alt="to top" src="fileadmin/templates/shared/images/btntoplink.gif"> </a></h2> #H2 2 = TEXT 2.field = header 2.wrap = <h2> | </h2> #H3(3) 3 = TEXT 3.field = header 3.wrap = <h3>|</h3> # dont need it (4) 4 = TEXT 4.field > stdWrap.fieldRequired = header stdWrap.if { equals.field = header_layout value = 100 negate = 1 } } # ENDE lib.stdheader }
Use your own label for content headers
17. September 2015
Page TSConfing:
TCEFORM.tt_content.header_layout { ## Rename content headers altLabels.1 = FIRST BIG Header altLabels.2 = Header2 altLabels.3 = Customized Header3 altLabels.100 = LLL:fileadmin/shared_locallang.xml:label_header_hidden } TCEFORM.tt_content.header_layout { ## Remove content headers removeItems = 0,4,5 }
Include TSconfig and TypoSript-Root-Template from files
19. February 2015
<INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/ts/TSconfig.ts"> <INCLUDE_TYPOSCRIPT: source="FILE:fileadmin/ts/root-template.ts">