liminspace / django-mjml

The simplest way to use MJML in Django templates.
MIT License
260 stars 32 forks source link

How to add attribute from tag a to mjml button ? #190

Closed kev26 closed 1 month ago

kev26 commented 1 month ago

This is my currently code <mj-button background-color="#ce4419" href="{{ base_url }}{{ poll.get_club_polls_url }}">Vote in the poll</mj-button>

so now I want to Per-link Disabling of Click Tracking from SparkPost document, It works ok with a tags like this <a data-msys-clicktrack="0" href="{{ base_url }}{{ poll.get_club_polls_url }}">{{ poll.title }}</a>

but with MJML button, I can't add that attribute to it like this

Vote in the poll

So how to update this attribute without custom the code by mj-raw ? Many thanks!!!

liminspace commented 1 month ago

Your question is not related to django-mjml, it's better to ask here https://github.com/mjmlio/mjml In your case you should try to use mj-html-attributes https://documentation.mjml.io/#mj-html-attributes