Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate template breadcrumbs #8233

Merged
merged 4 commits into from
Mar 21, 2024
Merged

Consolidate template breadcrumbs #8233

merged 4 commits into from
Mar 21, 2024

Conversation

anselmbradford
Copy link
Member

I noticed the breadcrumbs had inconsistent conditional logic, and in the case of the layout-2-1 template, had the breadcrumb_items definition twice(!)

Changes

  • Consolidate breadcrumbs boilerplate code into _breadcrumbs.html include.

How to test this PR

  1. Breadcrumbs should be unchanged on

Form explainer pages
http://localhost:8000/owning-a-home/loan-estimate/

iRegs
http://localhost:8000/rules-policy/regulations/1002/

FIG
http://localhost:8000/data-research/small-business-lending/filing-instructions-guide/2024-guide/

layout 2-1
http://localhost:8000/ask-cfpb/search/?q=mortage

layout 3-1
http://localhost:8000/consumer-tools/educator-tools/financial-well-being-resources/measure-and-score/

{{ breadcrumbs.render(breadcrumb_items) }}
</div>
{% endif %}
{% include '_breadcrumbs.html' %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could I please request that we use the "absolute" path to this ('v1/layouts/_breadcrumbs.html') instead of the relative one (here, and in the other instance below)? See comment here for rationale -- loading via relative paths is something bespoke to cf.gov which ideally we could deprecate someday.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, that also makes it consistent with the full layout that was already using the absolute path. Done in eb583e0

@anselmbradford anselmbradford added this pull request to the merge queue Mar 21, 2024
@chosak chosak removed this pull request from the merge queue due to a manual request Mar 21, 2024
@chosak chosak added this pull request to the merge queue Mar 21, 2024
Merged via the queue into main with commit 4ed4051 Mar 21, 2024
13 checks passed
@chosak chosak deleted the ans_breadcrumbs_condition branch March 21, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants