Search code examples
typo3typoscriptfluidtypo3-10.xtypo3-11.x

TYPO3 DataProcessing extract tt_content in a menu


I search for a TYPO3 TypoScript solution with a DataProcessing to build the menu and a part of tt_content in the colPos=0

110 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
110 {
    special = directory
    special.value = 41
    levels = 9
    includeSpacer = 0
    as = placesnavigation
    titleField = nav_title // title

    dataProcessing {
        20 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
        20 {
            table = tt_content
            orderBy = sorting
            where = colPos = 0
            as = placesInfoContent
        }
    }
}

But it works only from the active page and all pages get the same content.


Solution

  • here the final code, which now works!

    110 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
    110 {
        special = directory
        special.value = 41
        levels = 4
        includeSpacer = 0
        as = placesnavigation
        titleField = nav_title // title
    
        dataProcessing {
            20 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
            20 {
                table = tt_content
                pidInList.field = uid
                orderBy = sorting
                where = colPos = 0
                as = placesInfoContent
            }
        }
    }