Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Deep linking does not update menu item highlights #54

Open
goblindegook opened this issue Dec 25, 2014 · 2 comments
Open

Deep linking does not update menu item highlights #54

goblindegook opened this issue Dec 25, 2014 · 2 comments
Assignees
Labels
Milestone

Comments

@goblindegook
Copy link
Member

Navigating straight to a deep link does not update the menu appearance.

For example, pointing your browser to http://b3.dev/category/images does not highlight the menu items in the Category > Images path.

The onMenuItemUpdate event handler in the new MenuItemActivation behavior should also look at the menu item's object (containing the post or term ID), object_parent and object_type to determine whether the menu should be highlighted when the application loads.

@goblindegook goblindegook added this to the 1.0 milestone Dec 25, 2014
@goblindegook
Copy link
Member Author

At the moment, menu item state is updated on navigation events.

Instead, we should trigger the update when an archive or post view is loaded. Because the menu model contains references to object types and IDs, we can easily locate the corresponding menu item(s) to highlight. (Only a minor change is required to the MenuItem behavior for this.)

@goblindegook goblindegook self-assigned this Dec 27, 2014
@goblindegook
Copy link
Member Author

Fixing in #52. Still need to work around the possibility that the menu isn't available on view load.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant