TCA selectCheckBox - Output in fluid template

本秂侑毒 提交于 2019-12-12 03:53:56

问题


I use in TCA

        'uebersetzungen' => [
        'exclude' => true,
        'label' => 'LLL:EXT:maschinen/Resources/Private/Language/locallang_db.xlf:tx_maschinen_domain_model_maschine.uebersetzungen',
        'config' => [
            'type' => 'select',
            'renderType' => 'selectSingle',
            'items' => [
                ['6:1', 1],
                ['8:1', 2],
                ['11:1', 3],
                ['14:1', 4],
            ],
            'size' => 4,
            'maxitems' => 1,
            'eval' => ''
        ],
    ],

to get the output in fluid template with

        <f:switch expression="{maschine.uebersetzungen}">
            <f:case value="1">6:1</f:case>
            <f:case value="2">8:1</f:case>
            <f:case value="3">11:1</f:case>
            <f:case value="4">14:1</f:case>
        </f:switch>

Now I want to change the renderType to

'renderType' => 'selectSingleBox'

but I have no idea how to get the several values.

I read TYPO3 TCA type select in FLUID? but I'm not sure whether it's the same problem because I have a different syntax in TCA


回答1:


Thanks to @Paul Beck I found an answer for my problem.

I can use the solution posted here: TYPO3 TCA type select in FLUID?

But I had to change the line

protected $featuresDecoded;

to

protected $featuresDecoded = [];


来源:https://stackoverflow.com/questions/44728952/tca-selectcheckbox-output-in-fluid-template

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!