Flexible Container und Grids

Wie man flexible seiteninterne Strukturen mit einer einfachen Erweiterung Core-nah hinzufügt.

Genau dafür ist unsere neue Container-Erweiterung gedacht!

Quelle  

ext/container/Configuration/TCA/Overrides/tt_content.php

<?php
call_user_func(static function () {
    $additionalColumns = [
        'tx_container_parent' => [
            'label' => 'LLL:EXT:container/Resources/Private/Language/locallang.xlf:container',
            'config' => [
                'default' => 0,
                'type' => 'select',
                'foreign_table' => 'tt_content',
                // do not render standard tt_content elements, but only elements returned from itemsProcFunc
                // only necessary for TYPO3 9
                'foreign_table_where' => ' AND 1=2',
                'itemsProcFunc' => \B13\Container\Tca\ItemProcFunc::class . '->txContainerParent',
                'renderType' => 'selectSingle'
            ]
        ]
    ];

    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns(
        'tt_content',
        $additionalColumns
    );

    \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addFieldsToPalette(
        'tt_content',
        'general',
        'tx_container_parent'
    );

    $GLOBALS['TCA']['tt_content']['columns']['CType']['config']['itemGroups']['container'] = 'LLL:EXT:container/Resources/Private/Language/locallang.xlf:container';

    $GLOBALS['TCA']['tt_content']['columns']['colPos']['config']['itemsProcFunc'] = \B13\Container\Tca\ItemProcFunc::class . '->colPos';

    // copyAfterDuplFields colPos,sys_language_uid
    // useColumnsForDefaultValues colPos,sys_language_uid,CType
    // new element
    $GLOBALS['TCA']['tt_content']['ctrl']['useColumnsForDefaultValues'] .= ',tx_container_parent';

    // Workspace placeholder for container parent. Since this property got removed in
    // https://forge.typo3.org/issues/92791, only extend, if it still exists (TYPO3 < v11).
    // @todo Can be removed once v11 is the lowest supported version.
    if (isset($GLOBALS['TCA']['tt_content']['ctrl']['shadowColumnsForNewPlaceholders'])) {
        $GLOBALS['TCA']['tt_content']['ctrl']['shadowColumnsForNewPlaceholders'] .= ',tx_container_parent';
    }
});

// Configuration Container start
// #ZWEI-SPALTEN-MIT-HEADER
$GLOBALS['TCA']['tt_content']['types']['b13-2cols-with-header-container']['showitem'] = 'sys_language_uid,CType,header,tx_container_parent,colPos';

\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Container\Tca\Registry::class)->configureContainer(
    (
        new \B13\Container\Tca\ContainerConfiguration(
            'b13-2cols-with-header-container', // CType
            'ZWEI-SPALTEN-MIT-HEADER', // label
            'Zwei Spalten mit Header', // description
            [
                [
                    ['name' => 'header', 'colPos' => 200, 'colspan' => 2, 'allowed' => ['CType' => 'header, textmedia']]
                ],
                [
                    ['name' => 'left side', 'colPos' => 201],
                    ['name' => 'right side', 'colPos' => 202]
                ]
            ] // grid configuration
        )
    )
);
// #ZWEI-SPALTEN
$GLOBALS['TCA']['tt_content']['types']['b13-2cols']['showitem'] = 'sys_language_uid,CType,header,tx_container_parent,colPos';

// second container
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\B13\Container\Tca\Registry::class)->configureContainer(
    (
        new \B13\Container\Tca\ContainerConfiguration(
            'b13-2cols', // CType
            'ZWEI-SPALTEN', // label
            'Some Description of the Container', // description
            [
                [
                    ['name' => '2-cols-left', 'colPos' => 200],
                    ['name' => '2-cols-right', 'colPos' => 201]
                ]
            ] // grid configuration
        )
    )
);
// Configuration Container end

fileadmin/templates/ts/TS-Container.ts

// #ZWEI-SPALTEN-MIT-HEADER
tt_content.b13-2cols-with-header-container < lib.contentElement
tt_content.b13-2cols-with-header-container {
    //templateName fileadmin/Container/Resources/Private/Templates/2ColsWithHeader.html
    templateName = 2ColsWithHeader
    templateRootPaths {
        10 = fileadmin/Container/Resources/Private/Templates
    }
    dataProcessing {
        100 = B13\Container\DataProcessing\ContainerProcessor
    }
}

tt_content.b13-2cols-with-header-container < lib.contentElement
tt_content.b13-2cols-with-header-container {
     //templateName fileadmin/Container/Resources/Private/Templates/2ColsWithHeader.html
    templateName = 2ColsWithHeader
    templateRootPaths {
        10 = fileadmin/Container/Resources/Private/Templates/
    }
    dataProcessing {
        200 = B13\Container\DataProcessing\ContainerProcessor
        200 {
            colPos = 200
            as = children_200
        }
        201 = B13\Container\DataProcessing\ContainerProcessor
        201 {
            colPos = 201
            as = children_201
        }
        202 = B13\Container\DataProcessing\ContainerProcessor
        202 {
            colPos = 202
            as = children_202
        }
    }
}
// #ZWEI-SPALTEN
tt_content.b13-2cols < lib.contentElement
tt_content.b13-2cols {
    //templateName fileadmin/Container/Resources/Private/Templates/2Cols.html
    templateName = 2Cols
    templateRootPaths {
        10 = fileadmin/Container/Resources/Private/Templates
    }
    dataProcessing {
        100 = B13\Container\DataProcessing\ContainerProcessor
    }
}
    
tt_content.b13-2cols < lib.contentElement
tt_content.b13-2cols {
    //templateName fileadmin/Container/Resources/Private/Templates/2Cols.html
    templateName = 2Cols
    templateRootPaths {
        10 = fileadmin/Container/Resources/Private/Templates
    }
    dataProcessing {
        200 = B13\Container\DataProcessing\ContainerProcessor
        200 {
            colPos = 200
            as = children_200
        }
        201 = B13\Container\DataProcessing\ContainerProcessor
        201 {
            colPos = 201
            as = children_201
        }
      
    }
}

fileadmin/Container/Resources/Privat/Templates/2ColsWithHeader.html

<div class="2-cols-header-box" style="background: #DDDDDD">
    <f:if condition="{children_200}">
        <div class="header-children">
            <f:for each="{children_200}" as="child">
                <f:format.raw>{child.renderedContent}</f:format.raw>
            </f:for>
        </div>
    </f:if>

    <f:if condition="{children_201}">
        <div class="left-children">
            <f:for each="{children_201}" as="child">
                hallo left
                <f:format.raw>{child.renderedContent}</f:format.raw>
            </f:for>

        </div>
    </f:if>

    <f:if condition="{children_202}">
        <div class="right-children">
            <f:for each="{children_202}" as="child">
                hallo right
                <f:format.raw>{child.renderedContent}</f:format.raw>
            </f:for>
        </div>
    </f:if>
</div>


Warum AOS grundsätzlich SEO-freundlich ist

Die Verwendung der AOS (Animate On Scroll) Library hat keine negativen Auswirkungen auf das SEO,…



⟶

Typo3 13 - PHP Konfiguration im Plesk

1. PHP 8.3

2. PHP FPM Anwendung typo3

3. typo3temp > var > cache > Gesamter Cache löschen

4.…



⟶

Sys Log E_WARNING unterdrücken

Wenn Sie die Einstellungen über die grafische Oberfläche vornehmen möchten, loggen Sie sich als…



⟶

Google Ads ohne Conversions wegen gad_source?

Google Ads, Umstellung auf "gad" "gad_source", Anpassungen in den Typo3 Pagesettings.

Anpassungen >…



⟶

tx_news Listen Ansicht

Alternierende Layouts



⟶

TYPO3 YOAST SEO

Vorschau für eine Passwortgeschützte Seite.



⟶
SEO Typo3 PHP

Outline Effekt

Outline Effekt mit CSS erstellen



⟶
CSS

Typo3 V 12 Typoscript Einbindung

Typoscript Einbindung

Typoscript ab Typo3 Version 12 korrekt einbinden.



⟶

CSS - Checkbox & Radio Buttons

Checkbox und Radio Buttons mit css stylen



⟶
CSS

AOS Animate On Scroll Library

Webseiten-Inhalte beim Scrollen einblenden



⟶
CSS Java Script

Random Content

Inhalte zufällig auslesen



⟶
Typo3 Typo Script

IMG_RESOURCE

Bild aus Seiten Ressourcen auslesen.



⟶
Typo Script

RTE CKEditor - Code-Snippet

Der seit TYPO3 8 verwendete RTE CKEditor kann sehr gut auf die eigenen Bedürfnisse konfiguriert…



⟶
Typo3 Typo Script

Sprachen Variablen ab Version 9

globalVar und Language



⟶
Typo Script

DSGVO-konform

Google Fonts lokal einbinden. Anstatt die Schriften vom Google Server zu laden, können diese auch…



⟶

Sitemap

Die XML-Sitemap richtig routen



⟶
Typo Script XML

Flexible Container und Grids

Wie man flexible seiteninterne Strukturen mit einer einfachen Erweiterung Core-nah hinzufügt.



⟶
Typo3 Typo Script PHP

Transfonter

Online Webfont Generator



⟶
CSS

SEO Typo3 News

Sitemap für News mit mehreren Landing Pages.



⟶

TYPO3 Installieren

Mit Symlinks ohne SSH per FTP installieren



⟶
PHP Typo3

Inline Youtube Video

Youtub link mit einer css classe "youtube-play" in ein iFrame umwandeln



⟶

Masonry

Masonry Anwendung für Typo3 tx_news Listen Ansicht.



⟶

Gridelements

Mittels der Extension Grid Elements erhält der TYPO3-Entwickler die Möglichkeit, komfortabel…



⟶
Typo3 Typo Script

Clickstorm SEO

cs_seo Extension optimiert SEO für TYPO3



⟶
Typo3

Slick Slider & News

Typo3 tx_news Listview Slider ohne Erweiterung erstellen, Beispiel mit dem Open Source Slick Slider.



⟶

tx_news verschiedene Bildgrössen

Bildgrösse anpassen in der ListView und der DetailView



⟶

tx_news Powermail

Felder von tx_news an Powermail übergeben, in diesem Fall für eine Event Anmeldung..



⟶
Typo3 Typo Script

Mehrere Detail Templates

Hier ist beschrieben, wie Ihr die Detail-Ansicht auf mehrere Templates aufbaut. Dieser Part…



⟶

Fluid Templates

Fluid Templates: HTML-Vorlagen als Grundgerüst der Webseite



⟶
Typo Script Typo3

Site Configuration ab TYPO3 Version 9

Seit Version 9.5 beherrscht TYPO3 "Sprechende URLs" ohne Erweiterungen. Ihr benötigt nur eine Site…



⟶

Jquery Beispiele

Mobile Menu, Menu .fadeToggle(), Responsive, window.matchMedia



⟶

Typo Script Basics

Random Content, Aktuelles Datum ausgeben, tx_news date, tx_news alle Kategorien ausgeben



⟶
Typo3 Typo Script

mp4 Video

Video full Screen einbinden



⟶

tx_news

Template Selector & Templates, show in all view default, tx_news alle Kategorien ausgeben



⟶

Page Transitions.

A simple and easy jQuery plugin for CSS animated page transitions



⟶

Partner & Links

Inspiration & Wissen.



⟶