How would i go about getting the item selected in a a MenuTree object and store into a Custom Session property?
Not at laptop, but pretty sure you need to do this yourself using a custom view to display your menu items and have that write to the session prop. This is what I needed to do previously. Definitely something that could be nicer, as currently out of the box you can’t highlight the selected tab when it’s attached page is open (afaik)
If you look at the component methods for the Menu Tree you’ll find what is actually an Event specific to the Menu Tree:
onItemClicked. Within this event you have access to several properties of the item being clicked, and you can then write them to a session property.
# include check to verify item being clicked is actually enabled. if event.enabled: self.session.custom.lastURL = event.target