Snippets

Valberto Carneiro Django Semantic-ui title and breadcrumbs for admin templates

Created by Valberto Carneiro

File base.html Added

  • Ignore whitespace
  • Hide word diff
+{% block content_title %}
+{% if title %}
+<h1 class="ui header">
+    <div class="content">{{ title }}
+        <div class="sub header">
+            {% block breadcrumbs %}
+            <div class="ui small breadcrumb">
+                <a class="section" href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
+                {% if title %} 
+                <i class="right angle icon divider"></i> 
+                <div class="section active">{{ title }}</div>
+                {% endif %}
+            </div>
+            {% endblock breadcrumbs %}
+        </div>
+    </div>
+</h1>
+{% endif %}
+{% endblock content_title %}
HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.