Skip to content

get_newsletter_html should accept extra context #80

@mgax

Description

@mgax

For wagtail/wagtail.org#519, when rendering the webpage version of a newsletter, I need to exclude some content (e.g. the unsubscribe link). I'd like to be able to inject an additional flag into the email template, to exclude some blocks when rendering for the web (as opposed to rendering for email delivery). I'd like to be able to do this:

email_html = self.get_newsletter_html(extra_context={"rendering_for_web": True})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions