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
TYPO3 v7.6-如何在后端呈现tt_内容(页面模块)_Typo3_Typo3 7.6.x - Fatal编程技术网

TYPO3 v7.6-如何在后端呈现tt_内容(页面模块)

TYPO3 v7.6-如何在后端呈现tt_内容(页面模块),typo3,typo3-7.6.x,Typo3,Typo3 7.6.x,我正在从事一个TYPO3 v7.6项目,并使用flexform创建了一个内容元素,其中包含一个组类型字段,允许其他tt\U内容。以下是该字段的配置: <config type="array"> <type>group</type> <internal_type>db</internal_type> <allowed>tt_content</allowed> <size>

我正在从事一个TYPO3 v7.6项目,并使用flexform创建了一个内容元素,其中包含一个类型字段,允许其他tt\U内容。以下是该字段的配置:

<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>

组
分贝
tt_内容
5.
200
0
1.
1.
flexform工作正常,我可以在编辑它时添加内容。但是,我需要的是允许用户将同一页面上的内容移动(拖放)到该字段中,就像在以前的版本中使用TemplaVoila一样

我已经为tt_content_drawItem创建了一个钩子,它实现了界面PageLayoutViewDrawItemHookInterface,并且我能够更改插件的预处理函数,但是我不知道如何创建一个带有“创建新内容元素”的dropzone区域,允许tt_内容移动到其中

看起来,处理此问题的原始TYPO3的DragDrop.js文件无法移动到内容元素中,而只能移动到页面中。是这样吗

是否有实现此功能的方法,或者是否有允许此功能的扩展

编辑 经过几天的研究和尝试一些扩展,我可以找到一个适合我需要的解决方案。我正在使用扩展名fluidcontent创建具有以下流体模板的内容元素:

{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>
{namespace flux=FluidTYPO3\flux\ViewHelpers}

但是,对于包含内容区域的flexform字段,我仍然无法在后端拖放或可视化内容。

扩展Gridelements允许您在其他内容元素内创建内容元素(与TemplaVoilá非常相似)。我没有尝试过它是否允许您将内容元素拖动到其他元素中,但如果它也涵盖了这一点,我也不会感到惊讶。

现在需要做的就是将
放入预览部分

这是my 2column内容元素(在后端可见,包括拖放)的代码:

{namespace flux=FluidTYPO3\flux\ViewHelpers}
{namespace flux=FluidTYPO3\Flux\ViewHelpers}

    <f:layout name="Content" />

    <f:section name="Configuration">
        <flux:form id="2column" label="2 Columns" options="{icon: 'Icons/Content/Example.gif', group: 'MyGroup'}">
        </flux:form>
        <flux:grid>
            <flux:grid.row>
                <flux:grid.column colPos="0" label="Column 1" style="width: 50%" name="column1" />
                <flux:grid.column colPos="1" label="Column 2" style="width: 50%" name="column2" />
            </flux:grid.row>
        </flux:grid>
    </f:section>

    <f:section name="Preview">
        <flux:widget.grid />
    </f:section>

    <f:section name="Main">
        <div class="twocolumn1">
            <flux:content.render area="column1" />
        </div>
        <div class="twocolumn2">
            <flux:content.render area="column2" />  
        </div>
        <div class="clear"></div>
    </f:section>