Snippet List
A simple tag to render breadcrumbs.
Usage:
{% load breadcrumbs %}
{% breadcrumbs "['Home','Home','home']" "['Articles','Articles','articles']" "['object','object','object.get_absolute_url']" %}
Loads up the template in "modules/breadcrumbs.html" and renders it with a list of items.
You can provide the tag either with plain text stuff and named urls as the third argument ( any more arguments per bracket-block is parsed as args / kwargs for the reverse() call ) or the object directly, and the script tries after failing the reverse() to resolve the provided arguments.
Have pun.
- django
- templatetag
- breadcrumbs
Provides two template tags to use in your HTML templates:
breadcrumb and breadcrumb_url.
The first allows creating of simple url, with the text portion and url portion. Or only unlinked text (as the last item in breadcrumb trail for example).
The second, can actually take the named url with arguments! Additionally it takes a title as the first argument.
This is a templatetag file that should go into your /templatetags directory.
Just change the path of the image in the method **create_crumb** and you are good to go!
Don't forget to `{% load breadcrumbs %}` at the top of your html template!
[http://drozdyuk.blogspot.com/2009/02/dagood-django-breadcrumbs.html](http://drozdyuk.blogspot.com/2009/02/dagood-django-breadcrumbs.html)
- template
- tags
- navigation
- breadcrumbs
This is a simple URL based breadcrumb filter I'm using on a site I'm currently building. To use it, just throw the code into template-tag file, and simply pass the current url in a page template like so
{{ request.get_full_path|breadcrumbs }}
As an example of how to style it, wrap it in a unordered list with an id of breadcrumb, and then in your styles use #breadcrumb li { display: inline; }.
On a contact form for a site user, this will produce something along the lines of
you are here : [home](/) » [users](/users/) » [username](/username/) » contact form
Hopefully someone may find it useful.
6 snippets posted so far.