[TYPO3-english] Re: How to keep pagetype parameter using Powermail?
Thomas Ernst
typo3 at thernst.de
Sat May 9 07:29:10 CEST 2015
Hi @ll,
this thread is some days old, but I had the same issue and found a quite simple solution. I thought I will post it here so that it can be found in case some one else has this issue.
What did the trick is that all settings made for the extension in TypoScript are available in the templates.
So first I added a setting for powermail, which is then set to a different value depending on the page type:
[TS]
plugin.tx_powermail.settings.setup.targetPageType = 0
[globalVar = GP:type = 4711]
plugin.tx_powermail.settings.setup.targetPageType = 4711
[global]
[/TS]
Now you can modify the Form template of powermail (original can be found under EXT:powermail/Resources/Private/Templates/Form/Form.html) and add the pageType parameter to the f:form ViewHelper, setting its value from the newly created setting:
[HTML]
<f:form
action="{action}"
pageType="{settings.targetPageType}"
name="field"
enctype="multipart/form-data"
additionalAttributes="{vh:Validation.EnableParsleyAndAjax(form:form)}"
class="powermail_form powermail_form_{form.uid} {form.css} {vh:Misc.MorestepClass(activate:settings.main.moresteps, class:'powermail_morestep')}">
[/HTML]
Cheers
Thomas
More information about the TYPO3-english
mailing list