User Tools

Site Tools


typo3_sitepackage_contentelements

TYPO3 - Site Package - Content elements

Creating a Site Package

Why using a Site Package: http://de.slideshare.net/benjaminkott/typo3-the-anatomy-of-sitepackages

Code by Example: https://github.com/benjaminkott/example_package

Adding new Content elements to your Site Package

Manual to get started: http://t3-developer.com/typo3-installation/einrichtung/typo3-erweiteren/eigene-contentelemente-in-typo3-erstellen/

Setup new content element

Configuration/TypoScript/TSconfig/Page/TSconfig.txt
#### ELEMENT IN WIZARD MIT AUFNEHMEN
mod.wizards.newContentElement.wizardItems {
    common {
       elements {    
        slider {
            title = SLIDER ODER????
            description = Macht nen total fetzigen Slider
            icon = gfx/c_wiz/user_defined.gif
            tt_content_defValues {
                CType = slider
            }
        }
       }
	   show := addToList(slider)
    }
}

Dont forget to include it:

<INCLUDE_TYPOSCRIPT: source="FILE:EXT:t1_distribution/Configuration/TypoScript/TSconfig/Page/TSconfig.txt">
ext_tables.php
# FELDER VON TEXTPIC ÜBERNEHMEN ...
$TCA['tt_content']['types']['slider']['showitem'] = '--palette--;LLL:EXT:hello_world/Resources/Private/Language/locallang_mod.xlf:content_element.hello_world.general;general, --palette--;LLL:EXT:hello_world/Resources/Private/Language/locallang_mod.xlf:content_element.hello_world.header;header';
 
 
$backupCTypeItems = $GLOBALS['TCA']['tt_content']['columns']['CType']['config']['items'];
$GLOBALS['TCA']['tt_content']['columns']['CType']['config']['items'] = array(
    array(
        'Slider',
        '--div--'
    ),
    array(
        'Slider',
        'slider',
        'i/tt_content_header.gif'
    )
);
foreach($backupCTypeItems as $key => $value){
    $GLOBALS['TCA']['tt_content']['columns']['CType']['config']['items'][] = $value;
}
typo3_sitepackage_contentelements.txt · Last modified: 2015/10/07 12:56 by admin