Navigation module ignoring @navigation.register decorator #451
-
Hi, I’m trying to use the anvil-extras Navigation together with the Hash Routing navigation method. Here is what I’ve done: I started with the Hash Routing only. Everything worked ok. At this point the Navigation module is taking the task by generating the menus and the events needed to navigate to the target forms (set_url_hash(sender.tag.target)), as stucork explained to my in another post. Here comes my confusion about how this is working at all, because per documentation:
And I’m not using @navigation.register anywhere. So, I’m clearly missing something here. What could that be?
You will see the menu items defined in the visual designer, which are the ones I used for working directly with the Hash Routing + nav_click event, at the beginning, and also the dinamically generated links (the ones with icos) using the Navigation menu, which are the ones that are working now. Thank you !!! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Looking at the source code. The navigation.register has no effect when using hash routing. Which also means the title part of register is totally ignored. So might worth writing an issue for this as a bug or feature request. |
Beta Was this translation helpful? Give feedback.
-
Yep. Hash routing was added to the navigation module as a bit of an afterthought. Navigation includes a bespoke function for handling the title etc. when using "classic" routing, but it just delegates entirely to hash routing when that's being used and the decorator has no effect at all. |
Beta Was this translation helpful? Give feedback.
Looking at the source code. The navigation.register has no effect when using hash routing. Which also means the title part of register is totally ignored.
So might worth writing an issue for this as a bug or feature request.