Forum Discussion

HaroldvandeKamp's avatar
HaroldvandeKamp
Bronze Contributor
Sep 07, 2016
Solved

Support parameters when deploying navigation elements inside PnP provisioning templates

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:

 

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?

 

VesaJuvonenBertJansenPaolo Pialorsi

  • 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

  • Hi Harold, made a extention for the navigation for now as i am still missing some configuration possibilities kr, Paul
  • 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

Resources