Templatetags Package¶
Submodules¶
Breadcrumbs¶
:copyright (c) 2014 - 2022, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Department of Energy) and contributors. All rights reserved. :author
- class seed.templatetags.breadcrumbs.BreadcrumbNode(vars, render_func=<function create_crumb>)¶
Bases:
django.template.base.Node
- render(context)¶
Return the node rendered as a string.
- class seed.templatetags.breadcrumbs.UrlBreadcrumbNode(title, url_node, render_func=<function create_crumb>)¶
Bases:
django.template.base.Node
- render(context)¶
Return the node rendered as a string.
- seed.templatetags.breadcrumbs.breadcrumb(parser, token)¶
Section author: Andriy Drozdyuk
Renders the breadcrumb.
Example:
{% breadcrumb "Title of breadcrumb" url_var %} {% breadcrumb context_var url_var %} {% breadcrumb "Just the title" %} {% breadcrumb just_context_var %}
Parameters:
First parameter is the title of the crumb Second (optional) parameter is the url variable to link to, produced by url tag, i.e.: {% url "person_detail" object.id as person_url %} then: {% breadcrumb person.name person_url %}
- seed.templatetags.breadcrumbs.breadcrumb_root(parser, token)¶
Section author: Andriy Drozdyuk
Renders the breadcrumb.
Examples:
{% breadcrumb "Title of breadcrumb" url_var %} {% breadcrumb context_var url_var %} {% breadcrumb "Just the title" %} {% breadcrumb just_context_var %}
Parameters:
First parameter is the title of the crumb, Second (optional) parameter is the url variable to link to, produced by url tag, i.e.: {% url "person_detail/" object.id as person_url %} then: {% breadcrumb person.name person_url %}
- seed.templatetags.breadcrumbs.breadcrumb_url(parser, token)¶
Same as breadcrumb but instead of url context variable takes in all the arguments URL tag takes.
{% breadcrumb "Title of breadcrumb" person_detail person.id %} {% breadcrumb person.name person_detail person.id %}
- seed.templatetags.breadcrumbs.breadcrumb_url_root(parser, token)¶
Same as breadcrumb but instead of url context variable takes in all the arguments URL tag takes.
{% breadcrumb "Title of breadcrumb" person_detail person.id %} {% breadcrumb person.name person_detail person.id %}
- seed.templatetags.breadcrumbs.create_crumb(title, url=None)¶
Helper function
- seed.templatetags.breadcrumbs.create_crumb_first(title, url=None)¶
Helper function