Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8795897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:29:35+00:00 2026-06-13T23:29:35+00:00

I am using this django-plugin here: https://github.com/chronossc/django-breadcrumbs But I can’t seem to be able

  • 0

I am using this django-plugin here: https://github.com/chronossc/django-breadcrumbs

But I can’t seem to be able to check in the templates if there is actually an array of breadcrumbs or not… I have tried:

{%if request.breadcrumbs%} {% if request.breadcrumbs|length > 0%} 

and so on… but nothing truly tells me if there are some or not.

I want this bar to appear if I passed in breadcrumbs, and not appear in the case that I didn’t pass some breadcrumbs in my view:

{% if request.breadcrumbs|length > 0 %}
<div class="navbar navbar-fixed-top" style="top:38px;z-index:1029;" id="breadcrumb-sticky-header">
    <div class="container">
        <div class="container-fluid">
            <div class="row-fluid">
                <ul id="breadcrumb-sticky-header-inner" class="breadcrumb">
                    {% for breadcrumb in request.breadcrumbs %}
                    {% if not forloop.last %}
                    <li><a href="{{ breadcrumb.url }}">{{ breadcrumb.name }}</a> <span class="divider">/</span></li> 
                    {% else %}
                    <li class="active">{{ breadcrumb.name }}</li> 
                    {% endif %}
                    {% endfor %}
                </ul>
            </div>
        </div>
    </div>
</div>
{% endif %}

Here is the code in my view:

@login_required
def view(request, t_id):
    try:
        tshoot = Troubleshoot.objects.select_related('category', 'equipment', 'equipment__model').get(pk=t_id)
        request.breadcrumbs([
            (("%s: %s" % (tshoot.equipment.model.name, tshoot.equipment.serial)),
                '/equipment/view/%s/' % (tshoot.equipment.id)),
            (("%s" % (tshoot.category.name)),
                '/troubleshoot/categories/view/%s/' % (tshoot.category.id)),
            ((tshoot.title), '')
        ])
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:29:36+00:00Added an answer on June 13, 2026 at 11:29 pm

    Based on the code in the django-breadcrumbs project (line 191 in breadcrumbs.py: https://github.com/chronossc/django-breadcrumbs/blob/master/breadcrumbs/breadcrumbs.py#L191), It looks like they’ve implemented a .all() method.

    You should be able to use the |length template filter on the results of the .all() method to get the result you want, like so:

    {% if request.breadcrumbs and request.breadcrumbs.all|length > 0 %}
    

    I have not tested this; this is what my quick code inspection revealed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using this jquery plugin to generate QR Codes from string: https://github.com/jeromeetienne/jquery-qrcode It
I have implemented a registration/login/authentication system using this Django guide . But, how would
Hi I'm using django and the jquery expander plugin http://plugins.learningjquery.com/expander/ . When I use
I'm creating a form using Django, JQuery and JQuery Form plugin (http://jquery.malsup.com/form/) and I
I'm using this django app to implement PayPal IPN. I'm testing it using PayPal's
I'm trying to get Django running on GAE using this tutorial . When I
I am using Django Crispy Forms together with Twitter-bootstrap and following this page: http://django-crispy-forms.readthedocs.org/en/d-0/tags.html#bootstrap-layout-objects
This is using the web app framework, not Django. The following template code is
[I have posted this at the Django users | Google Groups also.] Using the
I'm using django with app-engine-patch and I'm having this wierd problem running manage.py dumpdata

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.