$wsNewsletter module, you can access newsletter functions. Typical use cases are subscription forms with target group selection, newsletter management in the customer account, or unsubscribe links in emails. In this section, you will learn how to load target groups and create newsletter forms.
Module overview
Example / excerpt of$wsNewsletter
ƒ() denotes a function.
Methods overview
| Method | Return type | Description |
|---|---|---|
getTargetGroups() | array | Loads the available newsletter target groups. |
Templates
Newsletter forms are typically used in the following places:- Footer: compact subscription form with email field.
- Custom page: detailed form with target group selection and additional fields.
- Customer account: management of newsletter subscriptions.
Variables
No variables are available for$wsNewsletter.
Methods
$wsNewsletter.getTargetGroups()
Loads the available newsletter target groups. Signature$wsNewsletter.getTargetGroups()
Return valuearray - List of available target groups.
Example that loads all target groups.
Actions
No actions are available for$wsNewsletter.
