Closed seirerman closed 7 years ago
Hi There, ist it possible to add an unsubscribe Link to a Newsletter Template? Or is there another possibility for unsubscribing the Newsletter?
Basicly you just need to call the delete action with the hash as argument.
You can see an example in the Edit.html template.
<f:link.action action="delete" arguments="{hash: address.registeraddresshash}" noCacheHash="1" pageUid="{settings.pagewithform}" absolute="1">unsubscribe</f:link.action>
with the target pageId of the formular for subscription.
I will need to have a look at direct mail to see how to get the hash of the user (its named registeraddresshash
in the tt_address table). But pretty sure it is possible.
Or are you using any other newsletter extension?
Yes, I'm using direct mail, would be great, if it's possible.
I will need to have a look at direct mail to see how to get the hash of the user (its named registeraddresshash in the tt_address table). But pretty sure it is possible.
In the configuration manager you have to configure EXT:direct_mail: add "registeraddresshash" to field "basic.addRecipFields". Then you can use this field and create the unsubscribe link with TypoScript:
typolink.parameter = 123
typolink.additionalParams = &tx_registeraddress_registerform[hash]=###USER_registeraddresshash###&tx_registeraddress_registerform[action]=delete&tx_registeraddress_registerform[controller]=Address
Thank you SventB, i will try this solution!
Please help:
What I am doing wrong? ###USER_registeraddresshash### wont be filled inside the url.
I added "registeraddresshash" inside directmail extension
also a lib.unsubscribe = TEXT lib.unsubscribe { value = austragen! typolink.parameter = 259 typolink.additionalParams = &tx_registeraddress_registerform[hash]=###USER_registeraddresshash###&tx_registeraddress_registerform[action]=delete&tx_registeraddress_registerform[controller]=Address }
After sending a newsletter to the test group I will not be changed:
https://domain.at/meta/newsletter-anmeldung/newsletterabmeldung/?tx_registeraddress_registerform[hash]=###USER_registeraddresshash###&tx_registeraddress_registerform[action]=delete&tx_registeraddress_registerform[controller]=Address
Thanks in advance
The solution is SventB's answer:
In the configuration manager you have to configure EXT:direct_mail: add "registeraddresshash" to field "basic.addRecipFields".
If a user comes to my newsletter page trying to unsubscribe, the user has to either
Maybe there should be a link for this in the default view of the plugin. direct_mail_subscription does this already.