{% load i18n %} {% comment %} This is the base template: - a kapt-catalog specific version exists in `catalog/partials/social_share.html` - a django-cms specific version exists in `cms/partials/social_share.html` To use this template, add the following lines in your template: {% trans "my custom text" as TWITTER_TEXT %} {% trans "my custom text" as LINKEDIN_TEXT %} {% trans "my custom text" as EMAIL_SUBJECT %} {% include "kapt_templates/partials/social_share.html" with twitter_text=TWITTER_TEXT linkedin_text=LINKEDIN_TEXT email_subject=EMAIL_SUBJECT %} ``` {% endcomment %}
{% block facebook_share %} {% block facebook_icon %}{% endblock facebook_icon %} {% endblock facebook_share %} {% block twitter_share %} {% if not twitter_text and debug %}
Missing Twitter text. You must add the following line on your include tag:
twitter_text=<your-sharing-text>
{% endif %} {% block twitter_icon %}{% endblock twitter_icon %} {% endblock twitter_share %} {% block linkedin_share %} {% if not linkedin_text and debug %}
Missing LinkedIn text. You must add the following line on your include tag:
linkedin_text=<your-sharing-text>
{% endif %} {% block linkedin_icon %}{% endblock linkedin_icon %} {% endblock linkedin_share %} {% block mailto_share %} {% if not email_subject and debug %}
Missing e-mail subject. You must add the following line on your include tag:
email_subject=<your-email-subject>
{% endif %} {% block mailto_icon %}{% endblock mailto_icon %} {% endblock mailto_share %}