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?
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:
change Classes/Domain/Model/Field.php
within your extension
and extend the $advancedFieldTypes
or $basicFieldTypes
array
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
In at least powermail 4.4.0 you can configure the exportability of custom fields with TypoScript:
tx_powermail.flexForm.type.addFieldOptions.myfield.export = 1
This is described in the manual https://docs.typo3.org/typo3cms/extensions/powermail/ForDevelopers/AddNewFields/Index.html
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.