0

I'd like to build a SharePoint Framework extension that, when active, changes the current navigation (typically the links on the left side of the page).

The current docs for SPFx Extensions don't list any hooks or methods specific to navigation in BaseExtension, so the best approach I can come up with is to run some jQuery in onInit, which seems not only hacky, but error-prone, since I'd be manipulating parts of the DOM managed by React.js. I'd like to know if there's a better approach or more targeted APIs.

Eric
  • 1,511
  • 1
  • 15
  • 28

1 Answers1

0

You may check the pnp JSOM sample.

https://github.com/SharePoint/PnP/blob/master/Samples/Core.Jsom.Navigation/README.md

Lee
  • 5,305
  • 1
  • 6
  • 12
  • That looks like C# code; it's not possible to modify server-side code in SP Online (Multi-tenant). How do I modify the navigation client-side, via JavaScript? There is no Core.Jsom.Navigation object available on the page. – Eric Mar 30 '18 at 13:32
  • @Eric: "That looks like C# code" No, that is definitely JavaScript. JSOM = JavaScript Object Model. Furhtermore, the description says "The provided SharePoint-hosted sample add-in uses JavaScript promises to control the flow of navigation updates" – pholpar Mar 04 '19 at 15:10
  • OK yeah, I don't know what I was thinking when I wrote the previous comment. – Eric Mar 04 '19 at 15:52