Forum Discussion
harishpatil
Aug 12, 2025Brass Contributor
How to highlight left navigation when we select the list view
Hi All, How to highlight left navigation when we select the list view? We have created list and the same list view URL we have added in left navigation links. When we select the view from the...
PankajBadoni
Aug 18, 2025Iron Contributor
Yes, you can achieve this using an SPFx Application Customizer.
Steps to Implement:
- Create an SPFx Application Customizer
This will allow you to inject custom navigation into your SharePoint pages. - Track the Current URL
Use window.location.href or window.location.search to detect which view is currently active. - Define Navigation Items with View IDs
Create a list of navigation links, each associated with a specific view ID. - Apply Styling to Highlight the Active Item
Use conditional logic to apply an active class to the navigation item that matches the current view. - Store Navigation Items in a SharePoint List
This allows for dynamic updates and easier management of navigation links without redeploying code.