Admin Template Branding Blocks

We commonly need to override the admin and home/dashboard branding
    for our users. While this can be done relatively easily by copying
    the wagtailadmin/home.html and wagtailadmin/login.html templates
    it would be a bit easier with smaller blocks.

    - Adds 'admin_branding_home' block to home.html
    - Adds 'block admin_branding_login' block to login.html
This commit is contained in:
Frank Wiles 2015-01-27 11:36:45 -06:00
parent 0f7104ce40
commit b83835fc7f
2 changed files with 3 additions and 3 deletions

View file

@ -19,7 +19,7 @@
</div>
{% endif %}
<div class="col9">
<h1>{% blocktrans %}Welcome to the {{ site_name }} Wagtail CMS{% endblocktrans %}</h1>
<h1>{% block admin_branding_home %}{% blocktrans %}Welcome to the {{ site_name }} Wagtail CMS{% endblocktrans %}{% endblock %}</h1>
<h2>{{ user.get_full_name|default:user.get_username }}</h2>
</div>
</div>

View file

@ -23,9 +23,9 @@
<form action="{% url 'wagtailadmin_login' %}" method="post" autocomplete="off">
{% csrf_token %}
<input type="hidden" name="next" value="{{ next }}" />
<h1>{% trans "Sign in to Wagtail" %}</h1>
<h1>{% block admin_branding_login %}{% trans "Sign in to Wagtail" %}{% endblock %}</h1>
<ul class="fields">
<li class="full">
<div class="field iconfield">