PSWriteHTML icon indicating copy to clipboard operation
PSWriteHTML copied to clipboard

New-HTMLNav - Locational Awareness

Open smasterson opened this issue 2 years ago • 3 comments

I have been using New-HTMLTopNav with success for a while now. The issue that I am running into is sprawl with nested links...

One way I thought could help tremendously here is if I switched to left nav (New-HTMLNav) and that it could 'know where you are' or more simply 'open to your location'.

Looking at the pic below, if I am browsing the page at Compute > VMware > Stats > Clusters and then want to jump to Compute > VMware > Stats > Hosts it takes like 5 clicks :-( If the nav opened/expanded the list to the current page it would be easier (one click) to navigate to other similar pages without having to open the menu and drill, drill, drill, drill each time.

image

Hope this makes sense!

smasterson avatar Sep 11 '23 22:09 smasterson

You want the state of nav to be saved. I am not sure how to do that. It's a good idea, but I doubt my html/css/js skills are high enough to do this. You would probably need limit the example, and post on stackoverflow or maybe ask chatgpt and then we can try and figure it out.

PrzemyslawKlys avatar Sep 12 '23 06:09 PrzemyslawKlys

I'm not sure 'saved' is needed as much as the ability to open/expand the menu to a certain link? If we could do that, we just look at the current pageid and open to the corresponding link?

smasterson avatar Sep 12 '23 12:09 smasterson

Either way, I don't have idea on how to do it properly. Feel free to experiment.

PrzemyslawKlys avatar Sep 12 '23 19:09 PrzemyslawKlys