powermail icon indicating copy to clipboard operation
powermail copied to clipboard

Extend the backend module

Open ps-devstudio opened this issue 1 year ago • 0 comments

Unfortunately, it's not possible to add additional columns in the backend module. This makes sense because it would require accessing the custom-defined columns. However, this functionality seems to already exist, as clicking on 'Show Mail Details' retrieves the mail data. There's also a list template available for the backend list action. Therefore, my question is: How can the backend list module be overridden in a custom extension? For example, at this point: https://github.com/in2code-de/powermail/blob/a6e5d927d74ba2454821484b57601958a53cbb72/Resources/Private/Partials/Module/List.html#L111

Thank you

PS:

I've done it myself by inserting the following code into the core file of Powermail:

<td nowrap="nowrap">
    <span title="{mail.senderName}">
        <f:for each="{mail.answers}" as="answer">
            <f:if condition="{answer.value}">
                <f:if condition="{answer.field.title} == 'My custom field'">
                    <f:if condition="{answer.valueType} == 0">
                        <f:format.nl2br>{answer.value}</f:format.nl2br>
                    </f:if>
                </f:if>
            </f:if>
        </f:for>
    </span>
</td>

It works, but it would be better in my own extension. I couldn't find anything about this in the TYPO3 documentation.

ps-devstudio avatar Mar 17 '24 15:03 ps-devstudio