Add / Update / Remove from Quick Launch or Navigation?

This might be a helpful action, especially for those that are trying to go all modern and aren’t customizing master pages.

An example of why this could be useful – we have a knowledge center and we use our quick launch to categorize pages/articles depending on the group they are in. There isn’t any way that I know to easily do this OOB (if there is I’d love to know it).

1 Like

Hi @clechner,

Thanks for the idea! I’ll discuss it with my team.

Best regards,
Petr Bushuev
Plumsail Team

Hi, are you meaning adding, updating and removing items from left navigation on Team sites? If so, I totally agree, much needed action.

1 Like

Teamsites and other places as well!

1 Like

Hi @clechner, @shakonarson,

Thank you for your feedback. We added this task to our backlog. No due dates though.

For now, you can use Provision PnP template action to create navigation items. I didn’t test it, but it should be possible according to PnP provision schema.

Best regards,
Anton Khritonenkov

1 Like

Ironic you mention PnP, I was just working on creating an Azure function implementing that solution.

Anton, I didn’t see that Plumsail Action before, very useful! That will help.

I’m glad it is useful for you! There are three articles describing different use cases for this action:

1 Like

This route ALMOST works for me. The problem is that I have a parent folder and it creates the parent folder every time.

There’s an option for “RemoveExistingNodes” but that removes EVERYTHING. That won’t work because there could be other nodes under that parent already.

Example - Let’s say I have the following navigation already in place on the site -

HOME
ANIMALS
   CATS
   DOGS

If I run the following template, it’s going to create a duplicate ANIMALS folder…

<?xml version="1.0"?>
<pnp:Provisioning xmlns:pnp="http://schemas.dev.office.com/PnP/2018/07/ProvisioningSchema">
<pnp:Preferences Generator="OfficeDevPnP.Core, Version=3.4.1812.1, Culture=neutral, 
PublicKeyToken=5e633289e95c321a" />
 <pnp:Templates ID="CONTAINER-TEMPLATE-84FEC7DAE05343588AEFD02534EFA8CF">
<pnp:ProvisioningTemplate ID="TEMPLATE-84FEC7DAE05343588AEFD02534EFA8CF" Version="1" 
 BaseSiteTemplate="ENTERWIKI#0" Scope="Web">
  <pnp:Navigation>
    <pnp:CurrentNavigation NavigationType="StructuralLocal">
      <pnp:StructuralNavigation RemoveExistingNodes="false">
        <pnp:NavigationNode Title="Animals" Url="{site}">
          <pnp:NavigationNode Title="Cheetah" Url="{site}/SitePages/Cheetah.aspx" />
        </pnp:NavigationNode>
      </pnp:StructuralNavigation>
     </pnp:CurrentNavigation>
  </pnp:Navigation>
  </pnp:ProvisioningTemplate>
 </pnp:Templates>
</pnp:Provisioning>

Hi @clechner,

Thank you for the explanation. Looks like it is impossible to incrementally update Quick Launch navigation using PnP. It is just not designed for incremental updates.

@shakonarson I would appreciate if you could describe your use case for modification of left navigation? Can it be covered by PnP template or not?

We will discuss it with the team.

Hi, we have a site design template in which we would like to add URLs to left navigation.

This is the use case:

I user creates an item in SharePoint list which has a status field. When that status field changes to approved state a team site is created based on a site design (done using Flow). When the site has been created we want to add to the left navigation a URL (link) to the display form for that list item and possible other URLs as well.

Hi @shakonarson,

Thank you for the description of your case.

Then, the solution described by @clechner above will work for you.

You can use Provision PnP template action to create navigation.

If you want to clear it before creating new items you can set RemoveExistingNodes="true"