How to add own action groups¶
Overview¶
In this how-to you will learn how to add new Actions Groups
and how to use
them within your templates.
Add a new action group¶
Login as admin.
Go to Django’s admin interface:
http://localhost:8000/admin/
Go to
Core / Action groups
.Click on the
Add Action Group
button.Enter the name of the group, e.g.
Sidebar
.
Display the actions within your templates¶
Insert the actions
tag to your template as following:
{% actions Sidebar %}
{% for action in actions %}
<div>
<a href="{{ action.link }}">
{{ action.title }}
</a>
</div>
{% endfor %}
Note
We pass the above given group name to the actions
tab. In this case
Sidebar
.