# Content elements for selected categories:
# ...
#
# CType: menu_categorized_content

tt_content.menu_categorized_content =< lib.contentElement
tt_content.menu_categorized_content {
    templateName = MenuCategorizedContent
    dataProcessing {
        10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
        10 {
            table = tt_content
            selectFields = tt_content.*
            groupBy = uid
            pidInList.data = leveluid : 0
            recursive = 99
            join.data = field:selected_categories
            join.wrap = sys_category_record_mm ON uid = sys_category_record_mm.uid_foreign AND sys_category_record_mm.uid_local IN(|)
            where.data = field:category_field
            where.wrap = tablenames='tt_content' and fieldname='|'
            as = content
            dataProcessing {
                10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
                10 {
                    references.fieldName = image
                }
            }
        }
    }
    stdWrap {
        editIcons = tt_content: header [header_layout], selected_categories, category_field
        editIcons {
            iconTitle.data = LLL:EXT:fluid_styled_content/Resources/Private/Language/FrontendEditing.xlf:editIcon.menu
        }
    }
}
