SOLVED

Support parameters when deploying navigation elements inside PnP provisioning templates

%3CLINGO-SUB%20id%3D%22lingo-sub-9999%22%20slang%3D%22en-US%22%3ESupport%20parameters%20when%20deploying%20navigation%20elements%20inside%20PnP%20provisioning%20templates%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-9999%22%20slang%3D%22en-US%22%3E%3CP%3EIt%20looks%20like%20the%20PnP%20provisioning%20template%20current%20doesn't%20support%20parameters%20inside%20navigation%20elements.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20deploy%26nbsp%3Ba%20provisioning%20template%20with%20the%20following%20code%20with%20parameter%20Sector%20provided%20with%20a%20value%20(e.g.%20Test)%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%20%20%20%20%20%20%26lt%3Bpnp%3ANavigation%26gt%3B%0A%20%20%20%20%20%20%20%20%26lt%3Bpnp%3AGlobalNavigation%20NavigationType%3D%22Structural%22%26gt%3B%0A%20%20%20%20%20%20%20%20%20%20%26lt%3Bpnp%3AStructuralNavigation%20RemoveExistingNodes%3D%22true%22%26gt%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%26lt%3Bpnp%3ANavigationNode%20Title%3D%22Home%22%20Url%3D%22%2F%22%20IsExternal%3D%22true%22%20%2F%26gt%3B%0A%20%20%20%20%20%20%20%20%20%20%26lt%3B%2Fpnp%3AStructuralNavigation%26gt%3B%0A%20%20%20%20%20%20%20%20%26lt%3B%2Fpnp%3AGlobalNavigation%26gt%3B%0A%20%20%20%20%20%20%20%20%26lt%3Bpnp%3ACurrentNavigation%20NavigationType%3D%22StructuralLocal%22%26gt%3B%0A%20%20%20%20%20%20%20%20%20%20%26lt%3Bpnp%3AStructuralNavigation%20RemoveExistingNodes%3D%22true%22%26gt%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%26lt%3Bpnp%3ANavigationNode%20Title%3D%22Start%22%20Url%3D%22%7Bsite%7D%22%20%2F%26gt%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%26lt%3Bpnp%3ANavigationNode%20Title%3D%22%7Bparameter%3ASector%7D%20Documenten%22%20Url%3D%22%7Bsite%7D%2FGedeelde%20%20documenten%2FForms%2FAllItems.aspx%22%20%2F%26gt%3B%0A%20%20%20%20%20%20%20%20%20%20%26lt%3B%2Fpnp%3AStructuralNavigation%26gt%3B%0A%20%20%20%20%20%20%20%20%26lt%3B%2Fpnp%3ACurrentNavigation%26gt%3B%0A%20%20%20%20%20%20%26lt%3B%2Fpnp%3ANavigation%26gt%3B%3C%2FPRE%3E%3CP%3EI%20get%20this%20result%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F3203iAC5E3A2C7E3CA6E8%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22Parameter%20not%20parsed%20for%20navigation%20elements.png%22%20title%3D%22Parameter%20not%20parsed%20for%20navigation%20elements.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EThe%20parameter%20is%26nbsp%3Bworking%20for%20other%20parts%20of%20the%20Provisioning%20template.%20Only%20for%26nbsp%3Bpnp%3ANavigation%20elements%20it%20doesn't%20get%26nbsp%3Bparsed%20correctly.%3C%2FP%3E%3CP%3ECan%20you%20dive%20into%20this%20and%20find%20a%20solution%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F369%22%20target%3D%22_blank%22%3E%40Vesa%20Juvonen%3C%2FA%3E%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F5670%22%20target%3D%22_blank%22%3E%40Bert%20Jansen%3C%2FA%3E%2C%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F127%22%20target%3D%22_blank%22%3E%40Paolo%20Pialorsi%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-10642%22%20slang%3D%22en-US%22%3ERE%3A%20Support%20parameters%20when%20deploying%20navigation%20elements%20inside%20PnP%20provisioning%20templates%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-10642%22%20slang%3D%22en-US%22%3EHi%20Harold%2C%20made%20a%20extention%20for%20the%20navigation%20for%20now%20as%20i%20am%20still%20missing%20some%20configuration%20possibilities%20kr%2C%20Paul%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-10110%22%20slang%3D%22en-US%22%3ERe%3A%20Support%20parameters%20when%20deploying%20navigation%20elements%20inside%20PnP%20provisioning%20templates%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-10110%22%20slang%3D%22en-US%22%3E%3CP%3EActually%20Erwin%20van%20hunen%20already%20implemented%20support%20for%20tokenized%20titles%20today...so%20it%20will%20in%20the%20next%20version%20which%20we'll%20be%20pushing%20out%20on%20Friday%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-10028%22%20slang%3D%22en-US%22%3ERe%3A%20Support%20parameters%20when%20deploying%20navigation%20elements%20inside%20PnP%20provisioning%20templates%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-10028%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F127%22%20target%3D%22_blank%22%3E%40Paolo%20Pialorsi%3C%2FA%3E%2C%20issue%20submitted%20on%20GitHub%20at%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2FOfficeDev%2FPnP-Sites-Core%2Fissues%2F735%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2FOfficeDev%2FPnP-Sites-Core%2Fissues%2F735%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-10004%22%20slang%3D%22en-US%22%3ERe%3A%20Support%20parameters%20when%20deploying%20navigation%20elements%20inside%20PnP%20provisioning%20templates%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-10004%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3ERight%20now%20we%20support%20tokens%20only%20in%20the%20Url%26nbsp%3Bproperty%20of%20the%20navigation%20node.%20If%20you%20need%20it%20in%20the%20Title%2C%20as%20well%20...%20I%20can%20update%20the%20object%20handler%20accordingly.%20Please%2C%20submit%20an%20issue%20on%20GitHub%2C%20so%20that%20we%20can%20keep%20track%20of%20this%20request.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBest%20regards%2C%3C%2FP%3E%3CP%3EPaolo%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Frequent 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
Highlighted
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

Highlighted

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 :)

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