Namespace: Microsoft.SharePoint.Publishing.Navigation
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Assembly: Microsoft.SharePoint.Publishing (in Microsoft.SharePoint.Publishing.dll)
Syntax:
here is the Powershell Script :
public static SPNavigationNode UpdateSPNavigationNode(
SPNavigationNode node,
SPNavigationNode previous,
string name,
string url,
string description,
string target,
string audience,
bool forceCreate
)
$webURL="http://servername/sites/P000527/"
$web=Get-SPWeb $webURL
$navigationNode=$web.Navigation.QuickLaunch
$LibraryNode = $navigationNode | where { $_.Title -eq "Library" }
$HomeNode= $navigationHomeNode | where { $_.Title -eq "Home" }
$NewTitle= "Libraries"
[Microsoft.SharePoint.Publishing.Navigation.SPNavigationSiteMapNode]::UpdateSPNavigationNode($LibraryNode, $HomeNode, $NewTitle, $LibraryNode.Url, "", "", "", $false)
$web.Dispose()
Refer this post for Sharepoint object model :
http://blog.mastykarz.nl/programmatically-configuring-menu-items-sharepoint-2010/
No comments:
Post a Comment