Forum Discussion
HaroldvandeKamp
Sep 07, 2016Bronze Contributor
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?
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
- DeletedHi 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
- HaroldvandeKampBronze Contributor
Thank you Paolo Pialorsi, issue submitted on GitHub at https://github.com/OfficeDev/PnP-Sites-Core/issues/735
- BertJansen
Microsoft
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 :-)