Skip to content

Add SPO Top Navigation Bar export script with translation support#961

Open
fabianhutzli wants to merge 1 commit into
pnp:mainfrom
fabianhutzli:export-topnavbar
Open

Add SPO Top Navigation Bar export script with translation support#961
fabianhutzli wants to merge 1 commit into
pnp:mainfrom
fabianhutzli:export-topnavbar

Conversation

@fabianhutzli

Copy link
Copy Markdown
Contributor

Summary

This sample adds a PnP PowerShell script that exports the Top Navigation Bar structure of a SharePoint Online site to a JSON file, including all multilingual translations per node.

Background: During a site configuration change, all navigation translations were lost and there was no backup — the business team had to retranslate everything manually. This script was created to prevent that from happening again by providing an easy way to export and back up the full navigation structure including all translations before making changes.

Features

  • Recursively traverses the full navigation tree, including nested children
  • Retrieves multilingual title resources per node (via LCID, e.g. 1031 = German, 1036 = French, 1040 = Italian)
  • Exports node metadata: Id, ParentId, Title, Url, IsExternal
  • Supports both direct per-language access (Title_*) and a full translation map (TitleResource)
  • Outputs to TopNavigation.json with full depth preserved

Script type

PnP PowerShell

Author

Fabian Hutzli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant