1

你好,
首先:对不起我的英语不好!谢谢你:D。

在 TYPO3 中,我创建了一个新的 gridelement,它只包含这个 Flexform 配置:(
它也被一个 xml-Tag 和其他东西包装,但我不能在这里复制它)

<image type="array">
  <TCEforms type="array">
    <label>Bild</label>
    <config type="array">
      <type>group</type>
      <internal_type>file</internal_type>
      <allowed>jpg,gif,png</allowed>
      <max_size>1200</max_size>
      <uploadfolder>uploads/tx_gridelements</uploadfolder>
      <show_thumbs>1</show_thumbs>
      <size>1</size>
      <minitems>0</minitems>
      <maxitems>1</maxitems>
    </config>
  </TCEforms>
</image>

<a href="t3://page?alias=type=&quot;array&quot;">
    <TCEforms type="array">
      <config type="array">
        <type>input</type>
        <eval>trim</eval>
        <wizards type="array">
          <_PADDING>2</_PADDING>
          <link type="array">
            <type>popup</type>
            <title>Link</title>
            <icon>link_popup.gif</icon>
            <module type="array">
            <name>wizard_element_browser</name>
            <urlParameters type="array">
            <mode>wizard</mode>
            <act>file</act>
            </urlParameters>
            </module>
            <params type="array">
              <blindLinkOptions></blindLinkOptions>
            </params>
            <JSopenParams>height=300,width=500,status=0,¬menubar=0,scrollbars=1</JSopenParams>
          </a>
        </wizards>
      </config>
      <label>Link</label>
    </TCEforms>
  </link>

<text type="array">
    <TCEforms type="array">
      <label>Text im Overlay</label>
      <config>
        <type>text</type>
        <cols>36</cols>
        <rows>12</rows>
        <proc>
          <HSC>0</HSC>
        </proc>
      </config>
      <defaultExtras>richtext[*]:rte_transform[flag=rte_enabled|mode=ts_css]</defaultExtras>
    </TCEforms>
</text>

为了在前端获取这个元素,我使用 TypoScript 渲染它,如下所示:

5 < lib.gridelements.defaultGridSetup
5 {

prepend = COA
prepend {

  10 = IMAGE
  10 {
    file {     
    import = uploads/tx_gridelements/
    import.data = field:flexform_image

    }
    stdWrap.wrap = <div class="team"><div class="image">|</div>
  }

  20 = TEXT
  20 {
    data = field:flexform_text
    parseFunc < lib.parseFunc_RTE
    wrap = <div class="text">|</div>
    required = 1

  }

  30 = TEXT
  30 {
    value = </div>
    stdWrap.typolink.parameter.data = field:flexform_link
  }
}}

在 TYPO3 7.6 中它工作得很好,我得到了一个可以插入图像的元素See Screenshot TYPO3 7.6

在 TYPO3 8.7 中,我收到一条错误消息,但找不到解决方案。TYPO3 8.7 中的相同区域,带有错误消息

你有什么主意吗?提前致谢!

4

2 回答 2

1

我随机找到了我的问题的答案。问题是链接!

<nameofthis>
  <TCEforms>
    <exclude>1</exclude>
    <label>
        Link to Page or a File or a Content-Element
    </label>
    <config>
        <type>input</type>
        <size>30</size>
        <eval>trim</eval>
        <softref>typolink,typolink_tag,images,url</softref>
        <wizards>
            <_PADDING>2</_PADDING>
            <link>
                <type>popup</type>
                <title>Link</title>
                <module>
                    <name>wizard_element_browser</name>
                    <urlParameters>
                        <mode>wizard</mode>
                    </urlParameters>
                </module>
                <icon>link_popup.gif</icon>
                <script>browse_links.php?mode=wizard</script>
                <params>
                    <!--<blindLinkOptions>page,file,folder,url,spec</blindLinkOptions>-->
                </params>
                <JSopenParams>height=500,width=500,status=0,menubar=0,scrollbars=1</JSopenParams>
            </link>
        </wizards>
    </config>
  </TCEforms>
  </nameofthis>

但是非常感谢您的帮助:-)

于 2018-01-17T09:47:32.130 回答
1

下面是完整的带有图像的flexform

<T3DataStructure>
    <meta>
        <langDisable>1</langDisable>
    </meta>
    <ROOT type="array">
        <type>array</type>
        <el type="array">
        <bgimage>
            <TCEforms>
        <label>Background Image</label>
                <config>
                    <type>inline</type>

                    <foreign_field>uid_foreign</foreign_field>
                    <foreign_label>uid_local</foreign_label>
                    <foreign_match_fields type="array">
                        <fieldname>bgimage</fieldname>
                    </foreign_match_fields>
                    <foreign_selector>uid_local</foreign_selector>
                    <foreign_selector_fieldTcaOverride type="array">
                        <config type="array">
                            <appearance type="array">
                                <elementBrowserAllowed>gif,jpg,jpeg,tif,tiff,bmp,pcx,tga,png,pdf,ai</elementBrowserAllowed>
                                <elementBrowserType>file</elementBrowserType>
                            </appearance>
                        </config>
                    </foreign_selector_fieldTcaOverride>
                    <foreign_sortby>sorting_foreign</foreign_sortby>
                    <foreign_table>sys_file_reference</foreign_table>
                    <foreign_table_field>tt_content</foreign_table_field>
                    <maxitems>1</maxitems>
                    <minitems>0</minitems>
                </config>
            </TCEforms>
        </bgimage>
        </el>
    </ROOT>
</T3DataStructure>
于 2019-11-15T07:38:42.263 回答