简体   繁体   中英

Typo3 Gridelements - setup not working

I'm using Typo3 7.6.10 with Gridelements 7.0.5. I'm trying to wrap the gridelement output with the following code but the wrapping is not working. Both files are loaded. The 2-cols-50-50 element is available in the backend and the static gridelements template is loaded. The content of the gridelement is displayed without the wrap defined in the gridelements.ts file.

I would be happy for every help.

tsconfig.ts

tx_gridelements {
    overruleRecords = 1
    setup {
        2-cols-50-50 {
            title = 2-Columns
            description = 2-columns contentelement
            topLevelLayout = 0
            config {
                colCount = 2
                rowCount = 1
                rows {
                    1 {
                        columns {
                            1 {
                                name = Left
                                colPos = 11
                            }
                            2 {
                                name = Right
                                colPos = 12
                            }
                        }
                    }
                }
            }
        }
    }
}

gridelements.ts

tt_content.gridelements_pi1.20.10.setup >
tt_content.gridelements_pi1.20.10.setup {
    2-cols-50-50 < lib.gridelements.defaultGridSetup
    2-cols-50-50 {
        columns {
            11 < .default
            11.wrap = <div class="left">|</div>
            12 < .default
            12.wrap = <div class="right">|</div>
        }
        wrap = <div class="well">|</div>
    }
}

I found the mistake. The static gridelements template has to be included before the extension template. Otherwise the static template overwrites tt_content.gridelements_pi1 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM