# Style to currently selected page in navigation menu

**URL:** <https://forum.inductiveautomation.com/t/style-to-currently-selected-page-in-navigation-menu/64778>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [October 3, 2022, 9:41pm UTC](https://forum.inductiveautomation.com/t/style-to-currently-selected-page-in-navigation-menu/64778 "2022-10-03T21:41:47Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![WillMT10](https://avatars.discourse-cdn.com/v4/letter/w/7feea3/32.png) [@WillMT10](https://forum.inductiveautomation.com/u/WillMT10)\
**Post date:** [October 3, 2022, 10:26pm UTC](https://forum.inductiveautomation.com/t/style-to-currently-selected-page-in-navigation-menu/64778/6 "2022-10-03T22:26:06Z")

</div>

I went a similar route but used an event instead of a transform and also incorporated recursion so that there could be a variable depth of child items in the menu:

> [@\[Perspective\] Highlight current view in Menu Bar](https://forum.inductiveautomation.com/t/perspective-highlight-current-view-in-menu-bar/24804/9):
>
> I don’t have this in a production system yet, but wanted to throw it out there in case it helps anyone. Instead of binding to every item in the Horizontal Menu and Menu Tree, I wrote a couple scripts that rely on the menu onItemClicked event and the event.path property within that event. The event.path is a list of item indexes that leads to the selected item. First I created a custom session property for holding the current selected path (this is my main menu, so it’s always visible and it c…

---

_[View the full topic](https://forum.inductiveautomation.com/t/style-to-currently-selected-page-in-navigation-menu/64778)._
