Skip to content

Commit

Permalink
Merge pull request #9 from gbdlin/feature/toolbox-sidebar-choice
Browse files Browse the repository at this point in the history
Ability to choose sidebar by context variable
  • Loading branch information
gbdlin committed Jun 15, 2020
2 parents 58dec42 + 650ff46 commit 99f11e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion admin_toolbox/templatetags/admin_toolbox_sidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@


@register.inclusion_tag('admin_toolbox/sidebar.html', takes_context=True)
def admin_sidebar_content(context, menu_name='default'):
def admin_sidebar_content(context, menu_name=None):

request = context.request
menu_name = menu_name or context.get('toolbox_sidebar_name') or 'default'

config = settings.sidebar.get(menu_name)

Expand Down

0 comments on commit 99f11e1

Please sign in to comment.