Extend TypoScript
Content Blocks generate a FLUIDTEMPLATE TypoScript
object for each Content Element. This TypoScript can be extended or overridden
as needed.
How to extend or override Content Blocks TypoScript
The basis for each Content Element
Every Content Element which is generated by Content Blocks inherits this TypoScript:
lib.contentBlock = FLUIDTEMPLATE
lib.contentBlock {
    dataProcessing {
        10 = content-blocks
    }
}
            
        Copied!
    
Finding the right TypoScript object
In the TypoScript backend module in the submodule "Active TypoScript", formerly
known as "TypoScript Object Browser", the Content Elements created by Content
Blocks can be found as usual in the section tt_.
The name corresponds to the typeName defined in config.yaml.
Example:
tt_content {
    myvendor_mycontentblockname {
        file = EXT:site_package/ContentBlocks/ContentElements/content-element-name/templates/frontend.html
        layoutRootPaths {
            20 = EXT:site_package/ContentBlocks/ContentElements/content-element-name/templates/layouts/
        }
        partialRootPaths {
            20 = EXT:site_package/ContentBlocks/ContentElements/content-element-name/templates/partials/
        }
    }
}
            
        Copied!
    
This TypoScript object has all the properties that FLUIDTEMPLATE offers.
Extend every Content Block
        EXT:site_package/Configuration/TypoScript/setup.typoscript
    
lib.contentBlock {
    settings {
        defaultHeaderType = {$styles.content.defaultHeaderType}
    }
    variables {
        demo = TEXT
        demo {
            value = some text
        }
    }
    dataProcessing {
        200 = menu
        200 {
          special = rootline
          as = breadcrumb
        }
    }
}
            
        Copied!
    
Extending a specific Content Block
        EXT:site_package/Configuration/TypoScript/setup.typoscript
    
tt_content.myvendor_mycontentblockname {
    settings {
        defaultHeaderType = {$styles.content.defaultHeaderType}
    }
    variables {
        demo = TEXT
        demo {
            value = some text
        }
    }
    dataProcessing {
        200 = menu
        200 {
          special = rootline
          as = breadcrumb
        }
    }
}
            
        Copied!
    
See also: