subscribe to newsletter/digest widget
-
is there a way to make a widget that asks users to subscribe to digest ?
-
You can, here are the rough steps.
In the widget's HTML, make an HTTP GET call to
/api/me/settings
and parse the response to see the value ofdailyDigestFreqOptions
. Actually,/api/me/settings
will only return a redirection URL, but you can replace that with the URL to your actual username instead/api/user/julian/settings
.Then customize your widget as you see fit... maybe only show the widget if the user has daily digest set to
off
. Otherwise, show<a href="/me/settings" class="btn btn-primary">Subscribe to Digest</a>
-
@julian said in subscribe to newsletter/digest widget:
You can, here are the rough steps.
In the widget's HTML, make an HTTP GET call to
/api/me/settings
and parse the response to see the value ofdailyDigestFreqOptions
. Actually,/api/me/settings
will only return a redirection URL, but you can replace that with the URL to your actual username instead/api/user/julian/settings
.Then customize your widget as you see fit... maybe only show the widget if the user has daily digest set to
off
. Otherwise, show<a href="/me/settings" class="btn btn-primary">Subscribe to Digest</a>
Nice thanks, will try !