Typo3 类型3:通量和;显示秒
我有以下通量模板:Typo3 类型3:通量和;显示秒,typo3,flux,fluid,Typo3,Flux,Fluid,我有以下通量模板: <f:section name="Configuration"> <flux:form id="galleria" enabled="TRUE" label="Galleria image & video plugin"> <flux:form.sheet name="data" label="Images / Videos"> <flux:form.section name="settings.i
<f:section name="Configuration">
<flux:form id="galleria" enabled="TRUE" label="Galleria image & video plugin">
<flux:form.sheet name="data" label="Images / Videos">
<flux:form.section name="settings.items" label="Items" inherit="0">
<flux:form.object name="item" label="Gallery item" inherit="0">
<flux:field.select name="type" label="Type"
items="{0: 'Please select', 1: 'Image', 2: 'Video', 3: 'IFrame', 4: 'Flickr', 5: 'Picasa', 6: 'Folder', 7: 'File Collection'}"
default="0"
requestUpdate="TRUE"/>
<f:debug>{type}</f:debug>
<f:comment>Image configuration fields</f:comment>
<flux:field.file name="original" label="Main image" displayCond="FIELD:type:=:1"
required="TRUE"/>
</flux:form.object>
</flux:form.section>
</flux:form.sheet>
</flux:form>
</f:section>
{type}
图像配置字段
displayCond不工作。即使我从名为type的选择列表中选择Image,输入字段也不会显示。
debug语句的输出显示为“NULL”
如何将displayCond与flux:form.object中的字段一起使用?注意:这不适用于TYPO3 7.6.x,但仅适用于6.2.x
我做了这个最小的例子FCE,它很有效。只要在配置部分,就不需要遍历section.object结构
type
在许多情况下是一个保留名称,它并不能很好地说明属性的行为。因此,我将其更改为mediatype
:
<div xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
xmlns:flux="http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers">
<f:layout name="Content" />
<f:section name="Configuration">
<flux:form id="example" label="displayCond example" enabled="1">
<flux:form.section name="slides" label="slides">
<flux:form.object name="slide" label="slide">
<flux:field.select name="mediatype" label="Media type"
items="{0: 'Please select', 1: 'Image', 2: 'Video', 3: 'IFrame', 4: 'Flickr', 5: 'Picasa', 6: 'Folder', 7: 'File Collection'}"
default="0"
requestUpdate="TRUE"/>
<flux:field.input name="title"
label="Title"
displayCond="FIELD:mediatype:=:1" />
</flux:form.object>
</flux:form.section>
</flux:form>
</f:section>
<f:section name="Preview">
</f:section>
<f:section name="Main">
</f:section>
</div>
希望这对你有用 您正在使用
requestUpdate=“TRUE”
。这很好,因此您可以使用以下选项:
<f:if condition="{type}==1">
<flux:field.file .... />
</f:if>
<f:if condition="{type}==2">
[...]
</f:if>
[...]
不仅适用于预览部分或主要部分。您也可以在配置部分中使用它。我不确定,但可以尝试一下:displayCond=“FIELD:sectionName.objectName.type:=:1”b'coz type in of section->object,如您在问题中所述+1对于问题,如果它有效或者您找到了另一个解决方案,请不要忘记分享;)字段:settings.items.item.type:=:1对我不起作用。为什么会被否决?请尝试这个例子,看看它是否有效。在T37.6上测试-没有成功。它肯定与form.object有关系。把它拿走——没关系。你说得对,豪克。这不适用于7.6.x。有关更多信息,请查看此伪造问题。