Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
选择Flexform的TYPO3样式_Typo3_Fluid - Fatal编程技术网

选择Flexform的TYPO3样式

选择Flexform的TYPO3样式,typo3,fluid,Typo3,Fluid,我有以下选择: <config> <type>select</type> <items type='array'> <numIndex index='0' type='array'> <numIndex index='0'>freie Plätze</numIndex> <numIndex index='1'>freie

我有以下选择:

<config>
    <type>select</type>
    <items type='array'>
        <numIndex index='0' type='array'>
            <numIndex index='0'>freie Plätze</numIndex>
            <numIndex index='1'>freie Plätze</numIndex>
        </numIndex>
        <numIndex index='1' type='array'>
            <numIndex index='0'>ausgebucht</numIndex>
            <numIndex index='1'>ausgebucht</numIndex>
        </numIndex>
    </items>
    (...)
</config>`
但我没有找到任何解决方案,所以我无法提供任何想法。对不起

我将TYPO3 7.6.16与DCE一起使用,并将流体模板与响应表一起使用

<f:for each="{field.kurs}" as="kurs">
<tr>
    <td>(...)</td>
    <td data-label="Status">{kurs.kursStatus}</td>
    <td>(...)</td>      
</tr>
(...)                               

(...)
{kurs.kursStatus}
(...)      
(...)                               

您选择的是Flexform吗?试试这个:

<settings.offer>
    <TCEforms>
        <label>Offer</label>
        <config>
            <type>select</type>
            <renderType>selectSingle</renderType>
            <items>
                <numIndex index="1">
                    <numIndex index="0">freie Plätze</numIndex>
                    <numIndex index="1">free</numIndex>
                </numIndex>
                <numIndex index="2">
                    <numIndex index="0">ausgebucht</numIndex>
                    <numIndex index="1">booked-up</numIndex>
                </numIndex>
            </items>
        </config>
    </TCEforms>
</settings.offer>

提供
选择
单选
弗雷·普拉泽
自由的
ausgebucht
预订满
在模板中添加css类:

<f:for each="{field.kurs}" as="kurs">
    <ul>
        <li>(...)</li>
        <li class="{f:if(condition: {settings.offer} == 'free', then: 'green', else 'red') }"></li>
        <li>(...)</li>
    </ul>
(...)

  • (……)
  • (……)
(...)
您选择的是Flexform吗?试试这个:

<settings.offer>
    <TCEforms>
        <label>Offer</label>
        <config>
            <type>select</type>
            <renderType>selectSingle</renderType>
            <items>
                <numIndex index="1">
                    <numIndex index="0">freie Plätze</numIndex>
                    <numIndex index="1">free</numIndex>
                </numIndex>
                <numIndex index="2">
                    <numIndex index="0">ausgebucht</numIndex>
                    <numIndex index="1">booked-up</numIndex>
                </numIndex>
            </items>
        </config>
    </TCEforms>
</settings.offer>

提供
选择
单选
弗雷·普拉泽
自由的
ausgebucht
预订满
在模板中添加css类:

<f:for each="{field.kurs}" as="kurs">
    <ul>
        <li>(...)</li>
        <li class="{f:if(condition: {settings.offer} == 'free', then: 'green', else 'red') }"></li>
        <li>(...)</li>
    </ul>
(...)

  • (……)
  • (……)
(...)
我无法在DCE中使用@Heinz Schilling的想法,但我找到了另一种DCE解决方案

这是flexform

<config>
<type>select</type>
<items type='array'>
    <numIndex index='0' type='array'>
        <numIndex index='0'></numIndex>
        <numIndex index='1'></numIndex>
    </numIndex>
    <numIndex index='1' type='array'>
        <numIndex index='0'>freie Plätze</numIndex>
        <numIndex index='1'>1</numIndex>
    </numIndex>
    <numIndex index='2' type='array'>
        <numIndex index='0'>ausgebucht</numIndex>
        <numIndex index='1'>2</numIndex>
    </numIndex>                 
</items>
<size>1</size>
<minitems>1</minitems>
<maxitems>1</maxitems>

选择
弗雷·普拉泽
1.
ausgebucht
2.
1.
1.
1.

这是流体模板

<f:if condition="{kurs.kursStatus}==1">                         
     <td data-label="Status" class="green">freie Plätze</td>
</f:if>
<f:if condition="{kurs.kursStatus}==2">                         
     <td data-label="Status" class="red">ausgebucht</td>
</f:if> 

弗雷·普拉泽
ausgebucht

我无法在DCE中使用@Heinz Schilling的想法,但我找到了另一种DCE解决方案

这是flexform

<config>
<type>select</type>
<items type='array'>
    <numIndex index='0' type='array'>
        <numIndex index='0'></numIndex>
        <numIndex index='1'></numIndex>
    </numIndex>
    <numIndex index='1' type='array'>
        <numIndex index='0'>freie Plätze</numIndex>
        <numIndex index='1'>1</numIndex>
    </numIndex>
    <numIndex index='2' type='array'>
        <numIndex index='0'>ausgebucht</numIndex>
        <numIndex index='1'>2</numIndex>
    </numIndex>                 
</items>
<size>1</size>
<minitems>1</minitems>
<maxitems>1</maxitems>

选择
弗雷·普拉泽
1.
ausgebucht
2.
1.
1.
1.

这是流体模板

<f:if condition="{kurs.kursStatus}==1">                         
     <td data-label="Status" class="green">freie Plätze</td>
</f:if>
<f:if condition="{kurs.kursStatus}==2">                         
     <td data-label="Status" class="red">ausgebucht</td>
</f:if> 

弗雷·普拉泽
ausgebucht

是否使用流体、标记或基于TS的渲染?你的模板看起来怎么样?@pgampe我填写了你要求的信息。你使用流体、标记还是基于TS的渲染?您的模板看起来怎么样?@pgampe我填写了您要求的信息。我在DCE流体模板中尝试过,但没有使用该条件。我在html中看到它是纯文本:{kurs.kursStatus}我在DCE流体模板中尝试了它,但没有使用条件。我在html中看到它是纯文本:“{kurs.kursStatus}”