plugin.tx_teaser2 {

    settings {

        layouts {

            grid1 {

                elements {

                    1 {
                        sources {
                            1 {
                                media = (max-width: 575.98px)
                                cropVariant = square
                                maxWidth = 576
                            }
                            2 {
                                media = (min-width: 576px) and (max-width: 767.98px)
                                cropVariant = horizontal1
                                maxWidth = 768
                            }
                            3 {
                                media = (min-width: 768px) and (max-width: 991.98px)
                                cropVariant = square
                                maxWidth = 496
                            }
                            4 {
                                media = (min-width: 992px) and (max-width: 1199.98px)
                                cropVariant = square
                                maxWidth = 600
                            }
                            5 {
                                media = (min-width: 1200px) and (max-width: 1399.98px)
                                cropVariant = vertical1
                                maxWidth = 600
                            }
                            6 {
                                media = (min-width: 1400px)
                                cropVariant = vertical1
                                maxWidth = 600
                            }
                        }
                    }

                    2 < .1
                    3 < .1
                    3 {
                        sources {
                            5 {
                                cropVariant = square
                            }
                            6 {
                                cropVariant = square
                            }
                        }
                    }
                    4 < .3
                    5 < .3
                    6 < .3

                }

            }

        }

    }

}


tt_content.teaser2 >
tt_content.teaser2 =< lib.contentElement
tt_content.teaser2 {

    templateName = Teaser2

    templateRootPaths {
        0 = EXT:fluid_styled_content/Resources/Private/Templates/
        10 = EXT:teaser2/Resources/Private/Templates/
        20 = {$plugin.tx_teaser2.view.templateRootPath}
    }
    partialRootPaths {
        0 = EXT:fluid_styled_content/Resources/Private/Partials/
        10 = EXT:teaser2/Resources/Private/Partials/
        20 = {$plugin.tx_teaser2.view.partialRootPath}
    }
    layoutRootPaths {
        0 = EXT:fluid_styled_content/Resources/Private/Layouts/
        20 = {$plugin.tx_teaser2.view.layoutRootPath}
    }

    settings {
        layouts < plugin.tx_teaser2.settings.layouts
    }

    dataProcessing {

        20 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
        20 {
            table = tx_teaser2_domain_model_item
            as = items
            pidInList.field = pid
            where {
                data = field:uid
                intval = 1
                wrap = content_uid=|
            }
            orderBy = sorting
            dataProcessing {
                20 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
                20 {
                    references.fieldName = media
                    as = media
                }
            }
        }
    }

}
