Cms: Breadcrumbs 'is_current' variable not registering

Created on 4 Feb 2020  路  2Comments  路  Source: statamic/cms

Issue description

When using the {{ nav:breadcrumbs }} tag, the is_current variable won't register when we're on a page where it should be registered.

I've tested this using my own build of a site and with the 'Cool Writings' starter kit.

Steps to reproduce the issue

  1. Add this code to a template:
{{ nav:breadcrumbs }}
    <li {{ if is_current }}class="text-black"{{ /if }}>
        <a href="{{ url }}">{{ title }} {{ if is_current }}(current){{ /if }}</a>
    </li>
{{ /nav:breadcrumbs }}
  1. Go to a page where the breadcrumbs can be displayed and that the page is shown on the breadcrumb.
  2. Check to see if the link has (current) sitting next to the label.
  3. Check if the <li> element has a class of text-black.

What's the expected result?

  • The label for the page name should be accompanied by the (current) text to the right of it.
  • The li item should have class="text-black" on it's tag.

What's the actual result?

  • The variable doesn't seem to be being registered.
  • No (current) text is visible.
  • No class is assigned to the tag.

Additional details / screenshot

I have followed the documentation here: https://statamic.dev/tags/nav-breadcrumbs

image
image

bug

All 2 comments

Thank you for this very well written issue.

Thank you for this very well written issue.

No problem, if you need any more information just let me know. Loving v3 so far though!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wm-simon picture wm-simon  路  3Comments

aerni picture aerni  路  3Comments

jimblue picture jimblue  路  3Comments

aerni picture aerni  路  4Comments

AndreasSchantl picture AndreasSchantl  路  3Comments