Home > Sharepoint > Adding Lists to the QuickLaunch in Sharepoint

Adding Lists to the QuickLaunch in Sharepoint

By default, the lists that we create through PowerShell are not in the quicklaunch, so we have to tell SharePoint that we want it there. The OnQuickLaunch value is set to $false so changing this to $true will add our Custom List to the Quicklaunch. We also need to allow ContentTypes in order to add our fields. Don’t forget to use the update() method to set the value.


PS > [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")

PS > $SPSite = New-Object Microsoft.SharePoint.SPSite("http://wss"); $OpenWeb = $SpSite.OpenWeb("/"); $List = $OpenWeb.Lists["My Custom List"]; $OpenWeb.Dispose(); $SPSite.Dispose()

PS > $List.OnQuickLaunch = $true
PS > $List.ContentTypesEnabled = $true
PS > $List.Update()

Now our list is added to the QuickLaunchBar

sharepoint-08

Rating 3.00 out of 5
[?]
Categories: Sharepoint Tags:
  1. June 23rd, 2009 at 12:01 | #1

    I have a number of lists that I wish to add to both my quicklaunch menu and my topnavbar. I also need to group certain lists together. Using the front end moss UI this is achieved by adding ‘Headings’. Any idea how I can get this working with Powershell??

    Any help greatly, greatly appreciated

  1. No trackbacks yet.

Spam Protection by WP-SpamFree