douxiong3245 2017-01-19 16:47
浏览 55

TYPO3 Powermail:如何将自定义字段添加到导出?

Powermail: 2.25.2
TYPO3: 6.2.19

I added a dynamic custom field to Powermail within a new extension and want to have the value included in the csv export. If I use the Powermail Module and expand the export block, there is a possibility to add additional fields to the export. Unfortunately, my custom field is not listed there.

What can I do?

  • 写回答

2条回答 默认 最新

  • duadpnld426905 2017-01-19 16:47
    关注

    From checking the template Resources/Private/Partials/Module/Export.html I had the idea, to add it to the template, but wasn't sure which ID.

    After some debugging through the extension I realized, that my custom field can easy be added to the ul.extended_export_field by the mentioned template, because it was already in the {page.fields} array. The condition for {field.advancedFieldType} prevented rendering the custom field, because it's type isn't in the advanced and basic fields.

    You have therefore 2 solutions to fix that:

    1. change Classes/Domain/Model/Field.php within your extension
      and extend the $advancedFieldTypes or $basicFieldTypes array

    2. change the template Resources/Private/Partials/Module/Export.html
      by adding a condition for your custom field type and render it into the list like <li id="{field.uid}">{field.title} <span class="info">(<f:translate key="FormField" />)</span></li>

    What I still not know is how to manipulate the output within the export.

    Update:

    Output can be modified within
    Resources/Private/Templates/Module/ExportCsv.html

    评论

报告相同问题?

悬赏问题

  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥50 我撰写的python爬虫爬不了 要爬的网址有反爬机制
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据