File tree Expand file tree Collapse file tree 2 files changed +28
-3
lines changed
djangocms_alias/templates/djangocms_alias Expand file tree Collapse file tree 2 files changed +28
-3
lines changed Original file line number Diff line number Diff line change @@ -132,9 +132,34 @@ Alias plugin
132132Alternatively, aliases can be used with the Alias plugin. It allows to select which alias content is shown at the
133133exact position the alias plugin is placed.
134134
135- Side notes
135+ Teemplates
136136==========
137137For the plugin to work out of the box ``{% block content %} `` is expected to exist in your main ``base.html `` file.
138+ Here is the template hierarchy for the edit and preview endpoints::
139+
140+ base.html
141+ └── djangocms_alias/base.html {% block content %}
142+ └── djangocms_alias/alias_content_preview.html {% block alias_content %}
143+
144+ Use Django's template override mechanism to customize these templates as needed. Say, if your base template has
145+ a different name and the content goes into a block called `main_content `, you would create a template at
146+ `templates/djangocms_alias/base.html ` with the following content::
147+ {% extends "mybase.html" %}
148+ {% load i18n %}
149+
150+ {% block title %}{% translate "Aliases" %}{% endblock %}
151+
152+ {% block breadcrumb %}{% endblock %}
153+ {% block footer %}{% endblock %}
154+
155+ {% block main %}
156+ <div class="aliases my-additional-class">
157+ {% block aliases_content %}
158+ {% endblock aliases_content %}
159+ </div>
160+ {% endblock main %}
161+
162+
138163
139164.. |PyPiVersion | image :: https://img.shields.io/pypi/v/djangocms-alias.svg?style=flat-square
140165 :target: https://pypi.python.org/pypi/djangocms-alias
Original file line number Diff line number Diff line change 11{% extends "base.html" %}
2- {% load i18n static sekizai_tags %}
2+ {% load i18n %}
33
4- {% block title %}{% trans "Aliases" %}{% endblock %}
4+ {% block title %}{% translate "Aliases" %}{% endblock %}
55
66{% block breadcrumb %}{% endblock %}
77{% block footer %}{% endblock %}
You can’t perform that action at this time.
0 commit comments