SOLVED

Support parameters when deploying navigation elements inside PnP provisioning templates

Bronze Contributor

It looks like the PnP provisioning template current doesn't support parameters inside navigation elements.

 

When I deploy a provisioning template with the following code with parameter Sector provided with a value (e.g. Test):

 

      <pnp:Navigation>
        <pnp:GlobalNavigation NavigationType="Structural">
          <pnp:StructuralNavigation RemoveExistingNodes="true">
            <pnp:NavigationNode Title="Home" Url="/" IsExternal="true" />
          </pnp:StructuralNavigation>
        </pnp:GlobalNavigation>
        <pnp:CurrentNavigation NavigationType="StructuralLocal">
          <pnp:StructuralNavigation RemoveExistingNodes="true">
            <pnp:NavigationNode Title="Start" Url="{site}" />
            <pnp:NavigationNode Title="{parameter:Sector} Documenten" Url="{site}/Gedeelde  documenten/Forms/AllItems.aspx" />
          </pnp:StructuralNavigation>
        </pnp:CurrentNavigation>
      </pnp:Navigation>

I get this result:

 

Parameter not parsed for navigation elements.png

The parameter is working for other parts of the Provisioning template. Only for pnp:Navigation elements it doesn't get parsed correctly.

Can you dive into this and find a solution?

 

@Vesa Juvonen@Bert Jansen@Paolo Pialorsi

4 Replies
best response confirmed by Harold van de Kamp (Bronze Contributor)
Solution

Hi,

Right now we support tokens only in the Url property of the navigation node. If you need it in the Title, as well ... I can update the object handler accordingly. Please, submit an issue on GitHub, so that we can keep track of this request.

 

Best regards,

Paolo

Actually Erwin van hunen already implemented support for tokenized titles today...so it will in the next version which we'll be pushing out on Friday :)

Hi Harold, made a extention for the navigation for now as i am still missing some configuration possibilities kr, Paul
1 best response

Accepted Solutions
best response confirmed by Harold van de Kamp (Bronze Contributor)
Solution

Hi,

Right now we support tokens only in the Url property of the navigation node. If you need it in the Title, as well ... I can update the object handler accordingly. Please, submit an issue on GitHub, so that we can keep track of this request.

 

Best regards,

Paolo

View solution in original post