Trying to retrieve all existing language resources of a global navigation Title in SPO #1386
Unanswered
rolfm-siemens-com
asked this question in
Q&A
Replies: 2 comments 3 replies
-
I'm encountering the same issue. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @rolfm-siemens-com & @agtenr I think you are misingg that after the methods you call for GetResourceEntries and GetValueForUICulture you need to run Invoke-PnPQuery to execute the method. $node = Get-PnPNavigationNode -Id <ID of navigation element>
$germanTitle = $node.TitleResource.GetValueForUICulture('de-de')
Invoke-PnPQuery
Write-Host "German Title Is: $($germanTitle.Value)"
$ResourceEntries = $node.TitleResource.GetResourceEntries()
Invoke-PnPQuery
$ResourceEntries #Resource Entries In This Variable Which results in the output below showing the German translation using GetValueForUICulture and the all the title resource entries (showing English, German and Spanish translation). Hope this helps |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello Community,
We have set up global navigation in one our QA tenants and now want to transport the navigation structure to the Productive tenant. Copy process works fine but we saw, that some of the navigation topics have multi lingual titles and I need to transport them also.
Retrieving navigation node with
$item=Get-PnPNavigationNode -connection $sourceConnection -Id $navItem.Id
result is
AudienceIds :
Children :
CurrentLCID : 1031
Id : 2020
IsDocLib : True
IsExternal : True
IsVisible : True
ListTemplateType : NoListTemplate
Title : Länder
TitleResource : Microsoft.SharePoint.Client.UserResource
Url : http://linkless.header/
Context : PnP.Framework.PnPClientContext
Tag :
Path : Microsoft.SharePoint.Client.ObjectPathIdentity
ObjectVersion :
ServerObjectIsNull : False
TypedObject : Microsoft.SharePoint.Client.NavigationNode
This Navigation node has a title in
TitleResouce property shows
Context : PnP.Framework.PnPClientContext
Tag :
Path : Microsoft.SharePoint.Client.ObjectPathProperty
ObjectVersion :
ServerObjectIsNull :
TypedObject : Microsoft.SharePoint.Client.UserResource
Now I need to retrieve all existing language instances of that title
tried with
$item.TitleResource.GetResourceEntries()
-no response
$item.TitleResource.GetValueForUICulture('de-de')
-no Response
I assume I need to load / retrieve the content somehow, but I do not have any idea here.
I assume that the process will be the same for all multilingual properties.
Every help is much appreciated.
Environment is pnp.powershell V1.8.0
Best Regards,
Rolf.
Beta Was this translation helpful? Give feedback.
All reactions