Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single subscribe/unsubscribe page #237

Closed
alexanderloewe opened this issue Jul 22, 2021 · 3 comments
Closed

Single subscribe/unsubscribe page #237

alexanderloewe opened this issue Jul 22, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@alexanderloewe
Copy link

We use different mailing lists and in these again some lists. Now it would be quite time-consuming to create a separate unsub page for each list and link it to the templates.

My idea is to loop over all mailinglists and the lists contained in them to give the user the choice of subscribing or unsubscribing from all lists or just some of them in one place. Like in the screenshot.

Mailinglist 1

  • List 1
  • List 2
  • List 3

Mailinglist 2

  • List 1
  • List 2
  • List 3

E-Mail field

Bildschirmfoto 2021-07-22 um 22 54 48

@alexanderloewe alexanderloewe added the enhancement New feature or request label Jul 22, 2021
@alexanderloewe alexanderloewe changed the title Give the user the yoise One unsub page Jul 22, 2021
@bencroker bencroker changed the title One unsub page One unsubscribe page Jul 23, 2021
@bencroker
Copy link
Collaborator

You can achieve this with a custom controller that subscribes/unsubscribes a contact to mailing lists: https://putyourlightson.com/plugins/campaign#subscribing-a-contact-to-a-mailing-list

Alternatively, if you cannot create a custom controller, then you could implement this on the front-end using JavaScript, by calling the front-end form action endpoints: https://putyourlightson.com/plugins/campaign#front-end-forms

We are aware that this could be made simpler so I'll leave this feature request open and hopefully we can add at some point in future.

@bencroker bencroker changed the title One unsubscribe page Single subscribe/unsubscribe page Jul 29, 2021
@bencroker bencroker added this to the v3 milestone Oct 13, 2022
@alexanderbuergin
Copy link

alexanderbuergin commented Nov 24, 2023

Lately I've been seeing a lot of centralized subscription management for the email settings of newsletter/email marketing tools.

It would be great if we could get this for Craft Campain as well.

Bildschirmfoto 2023-11-24 um 23 30 41

@bencroker bencroker removed this from the v3 milestone Apr 8, 2024
@bencroker
Copy link
Collaborator

bencroker commented Apr 8, 2024

Added the ability to bulk subscribe/unsubscribe an existing contact from one or more mailing list using a front-end form in 2.14.0.

    <h3>Subscribed Mailing Lists:</h3>
    {% for mailingList in craft.campaign.mailingLists.all() %}
        <label for="{{ mailingList.slug }}">{{ mailingList.title }}</label>
        <input type="hidden" name="mailingList[{{ mailingList.id }}]" value="0">
        <input id="{{ mailingList.slug }}" type="checkbox" name="mailingList[{{ mailingList.id }}]" value="1" {{ contact.isSubscribedTo(mailingList) ? 'checked' }}>
    {% endfor %}

See the full example in the docs at https://putyourlightson.com/plugins/campaign#contact-update-form

@bencroker bencroker reopened this Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants