我正在开发一个 TYPO3 v7.6 项目,并创建了一个带有 flexform 的 Content Element,其中包含一个允许其他tt_content的组类型字段。这是该字段的配置:
<config type="array">
<type>group</type>
<internal_type>db</internal_type>
<allowed>tt_content</allowed>
<size>5</size>
<maxitems>200</maxitems>
<minitems>0</minitems>
<multiple>1</multiple>
<show_thumbs>1</show_thumbs>
</config>
flexform 工作正常,我可以在编辑时添加内容。但是,我需要的是允许用户将同一页面上的内容移动(拖放)到该字段内,就像在以前的版本中使用 TemplaVoila 时一样。
我为tt_content_drawItem创建了一个钩子,它实现了PageLayoutViewDrawItemHookInterface接口,并且我能够更改我的插件的preProcess函数,但我不知道如何使用“创建新内容元素”创建一个放置区区域,它允许 tt_content被移入其中。
看起来处理此问题的原始 TYPO3 的DragDrop.js文件无法移动到内容元素中,而只能移动到页面中。这是正确的吗?
有没有实现这一点,或者任何允许这个功能的扩展?
编辑
经过几天的研究并尝试了一些扩展,我可以找到适合我需求的解决方案。我正在使用扩展流体内容创建具有以下流体模板的内容元素:
{namespace flux=FluidTYPO3\Flux\ViewHelpers}
<f:layout name="Default" />
<f:section name="Configuration">
<flux:grid>
<flux:grid.row >
<flux:grid.column name="content" label="Content"/>
</flux:grid.row>
</flux:grid>
</flux:form>
</f:section>
<f:section name="Preview">
</f:section>
<f:section name="Main">
<flux:content.render area="content" />
</f:section>
但是,对于包含内容区域的 flexform 字段,我仍然无法拖放甚至可视化后端的内容。