SOLVED

Deployment of SharePoint navigation items using the provisioning engine ignored

Bronze Contributor

We are deploying site structure using a PnP provisioning template to the root of SharePoint site collections using the PnP Provisioning framework. Everything gets deployed except navigation items.

 

I've narrowed the situation down to a small provisioning script with only Security and Navigation elements. When I deploy this, the security element is picked up by the provisioning engine, but the navigation element not.

Why is this not working?

 

 

<?xml version="1.0"?>
<pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2016/05/ProvisioningSchema">
  <pnp:Preferences Generator="OfficeDevPnP.Core, Version=2.6.1608.0, Culture=neutral, PublicKeyToken=3751622786b357c2" />
  <pnp:Templates ID="CONTAINER-TEMPLATE-7FB72622E1654B1C9765678E8C5093A3">
    <pnp:ProvisioningTemplate ID="TEMPLATE-7FB72622E1654B1C9765678E8C5093A3" Version="1" BaseSiteTemplate="STS#0">
      <pnp:Security ClearSubscopes="false">
        <pnp:AdditionalOwners>
          <pnp:User Name="c:0-.f|rolemanager|spo-grid-all-users/9fcc7bfd-834f-4f72-89f1-509ad9e9a92f" />
        </pnp:AdditionalOwners>
      </pnp:Security>
      <pnp:Navigation>
        <pnp:GlobalNavigation NavigationType="Structural">
          <pnp:StructuralNavigation RemoveExistingNodes="true">
            <pnp:NavigationNode IsExternal="true" Title="Wikipedia" Url="http://www.wikipedia.org"></pnp:NavigationNode>
          </pnp:StructuralNavigation>
        </pnp:GlobalNavigation>
        <pnp:CurrentNavigation NavigationType="Structural">
          <pnp:StructuralNavigation RemoveExistingNodes="true">
            <pnp:NavigationNode IsExternal="false" Title="Start" Url="/SitePages/Home.aspx"></pnp:NavigationNode>
            <pnp:NavigationNode IsExternal="false" Title="Project team" Url="{site}">
              <pnp:NavigationNode IsExternal="false" Title="Work docs" Url="{site}/Work documents"></pnp:NavigationNode>
              <pnp:NavigationNode IsExternal="false" Title="Mail" Url="{site}/Work mail"></pnp:NavigationNode>
              <pnp:NavigationNode IsExternal="false" Title="Deliverables" Url="{site}/Deliverables"></pnp:NavigationNode>
            </pnp:NavigationNode>
<pnp:NavigationNode IsExternal="true" Title="Wikipedia" Url="http://www.wikipedia.org"></pnp:NavigationNode> </pnp:StructuralNavigation> </pnp:CurrentNavigation> </pnp:Navigation> </pnp:ProvisioningTemplate> </pnp:Templates> </pnp:Provisioning>

 

I've managed to deploy the navigation items as a workaround using the PnP PowerShell august 2016 cmdlets using the Add-SPONavigationNode method, but I would like to transform this into a provisioning template.

 

3 Replies

Shameless plug 🙂 https://github.com/InstantQuick/InstantQuick-SharePoint-Provisioning

 

It does what you want by default.

best response confirmed by HaroldvandeKamp (Bronze Contributor)
Solution

Currently the navigation component only works for publishing sites...that might be your problem? If you need it for regular sites as well I suggest logging an issue in the PnP-Sites-Core repo (https://github.com/OfficeDev/pnp-sites-core/issues) or alternatively propose a change via a PR.

1 best response

Accepted Solutions
best response confirmed by HaroldvandeKamp (Bronze Contributor)
Solution

Currently the navigation component only works for publishing sites...that might be your problem? If you need it for regular sites as well I suggest logging an issue in the PnP-Sites-Core repo (https://github.com/OfficeDev/pnp-sites-core/issues) or alternatively propose a change via a PR.

View solution in original post