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

show current page in primary nav #133

Merged
merged 1 commit into from
Jul 4, 2024
Merged

show current page in primary nav #133

merged 1 commit into from
Jul 4, 2024

Conversation

sarahframe
Copy link

No description provided.


@register.filter
def starts_with(value, arg):
Copy link
Member

Choose a reason for hiding this comment

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

Wild that this isn't a default tag (given some of the things that are)

"""
Return the primary navigation data as a dict, for use with the 'json_script' filter.
"""
primary_nav_items = _get_primary_nav_items()
l1_menu_item_data = [_l1_item_to_dict(item) for item in primary_nav_items]

current_path = context["request"].path

for item in l1_menu_item_data:
Copy link
Member

Choose a reason for hiding this comment

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

Do we still need to do this, given we've used a different approach in the template?

Copy link

@liamjohnston liamjohnston Jul 4, 2024

Choose a reason for hiding this comment

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

If you're asking whether we need it in both the template and the JSON blob, then the answer is yes :/

Copy link
Member

Choose a reason for hiding this comment

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

Ah, right. In my head we were using the same data for both

@sarahframe sarahframe merged commit 5d98587 into main Jul 4, 2024
3 of 5 checks passed
@sarahframe sarahframe deleted the fix/bed-fixes branch July 4, 2024 21:09
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