【问题标题】:TYPO3 - Use TS in Flexform OR flexform in flexformTYPO3 - 在 Flexform 中使用 TS 或在 flexform 中使用 flexform
【发布时间】:2013-02-19 17:45:04
【问题描述】:

我想使用表中的数据和动态设置的 SQL 查询中的 PID 运行此 flexform 代码。

这可能吗?

<label>Selectbox from DB</label>
<config>
  <type>select</type>
  <items type="array">
    <numIndex index="0" type="array">
      <numIndex index="0"></numIndex>
      <numIndex index="1"></numIndex>
    </numIndex>
  </items>
  <foreign_table>tt_content</foreign_table>
  <foreign_table_where>
     AND tt_content.pid = 22   <<<< no good at all.... What to do?
  </foreign_table_where>
</config>

如果只有 FF 可以访问 PID,这些都可以正常工作:

  • PID 设置为插件的存储文件夹
  • 在 TS 中设置 PID
  • 在另一个 flexform 字段中设置 PID(重新加载),然后在查询中使用

BR。安德斯

【问题讨论】:

    标签: typo3


    【解决方案1】:

    “半”答案是为插入插件的页面设置的存储文件夹。可以使用标记###STORAGE_PID###直接访问页面存储文件夹

    在上面的例子中使用这一行:

      <foreign_table_where>
         AND tt_content.pid = ###STORAGE_PID###
      </foreign_table_where>
    

    但我仍然想知道如何重用像这样的 flexform 或静态扩展模板中设置的 TS 中的值:

      <foreign_table_where>
         AND tt_content.pid = FIELD:previousFieldInThisFlexformAvailableAfterReload
      </foreign_table_where>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-08-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-24
      • 1970-01-01
      • 2017-05-16
      • 2016-12-16
      相关资源
      最近更新 更多