You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to get <button></button> rendered in the front end when selecting a button plugin, instead I get <a href=""></a> with class="btn". I'm not sure if there is a better way to do this.
{% if instance.link_type == "btn" %}button{% else %}a href="{{ link }}"{% endif %}Opening tag {% if instance.link_type == "btn" %} data-link="{{ link }}"{% endif %}Optional {% if instance.link_type == "btn" %}button{% else %}a{% endif %}Closing tag
The text was updated successfully, but these errors were encountered:
I'm not sure why you would prefer a button tag. A button cannot have a href which means you would need to add custom js to make it work. In bootstrap the <a class="btn btn-primary">...</a> is the canonical way to have a link which look like a button. Or am I missing something?
I was trying to get
<button></button>
rendered in the front end when selecting a button plugin, instead I get<a href=""></a>
withclass="btn"
. I'm not sure if there is a better way to do this.{% if instance.link_type == "btn" %}button{% else %}a href="{{ link }}"{% endif %}
Opening tag{% if instance.link_type == "btn" %} data-link="{{ link }}"{% endif %}
Optional{% if instance.link_type == "btn" %}button{% else %}a{% endif %}
Closing tagThe text was updated successfully, but these errors were encountered: