Giter VIP home page Giter VIP logo

Comments (7)

prymitive avatar prymitive commented on June 10, 2024

I'll check that later today and push a fix if needed. Thanks

from bootstrap-breadcrumbs.

prymitive avatar prymitive commented on June 10, 2024

Can you test latest code from github? If it works I'll push new version to pypi. Thanks

from bootstrap-breadcrumbs.

mark0978 avatar mark0978 commented on June 10, 2024

I'll test it tonight.

from bootstrap-breadcrumbs.

mark0978 avatar mark0978 commented on June 10, 2024

This no longer throws an error, but this does not render any breakcrumbs

{% block breadcrumbs %}
  {% breadcrumb customer 'customer-details' cust_id=customer.id %}
  {% breadcrumb customer 'contact-details' cust_id=customer.id contact_id=contact.id %}
{% endblock %}

{% block content %}
  bc{% render_breadcrumbs %}cb
  ...
{% endblock content %}

renders like
image

The inspector shows it like:
image

from bootstrap-breadcrumbs.

prymitive avatar prymitive commented on June 10, 2024

can you retry with latest code from github?

from bootstrap-breadcrumbs.

prymitive avatar prymitive commented on June 10, 2024

if it still doesn't work please paste contact-details and urls.py for it (only view definition, not full code), maybe I'm missing test case for it

from bootstrap-breadcrumbs.

mark0978 avatar mark0978 commented on June 10, 2024

Ok, the problem is one of documentation. Notice above how I have two blocks, one for breadcrumbs and one for content, you can't do that because you don't know which order the blocks will be rendered in. The docs need to say do all of it inline in one block like this:

  {% breadcrumb customer 'customer-details' cust_id=customer.id %}
  {% breadcrumb customer 'contact-details' cust_id=customer.id contact_id=contact.id %}
  {% render_breadcrumbs %}

This works as expected. I had to go thru the debugger to understand what was happening, but it really was this simple.

The kwargs problem was a real problem, this last issue was just documentation that wasn't explicit enough.

Even though the blocks were in the right order in this template, they were in a different order in the site base template and therefore they rendered incorrectly. In my case breadcrumbs were added AFTER they had been rendered.

from bootstrap-breadcrumbs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.