• 3 ways to edit SharePoint page properties

    by  • May 19, 2010 • MOSS 2007, PowerShell • 1 Comment

    Here comes another post in the series of “3 ways to do….”. Here is how you can edit the properties of a page in Sharepoint

    using browser

    1. Go to the pages library of the site.
    2. Click Checkout menu of the page
    3. Click property menu of the page
    4. Edit property and save
    5. Finally checkin that page
    using Object model

    SPSite site = new SPSite("http://mysite");
    SPWeb web = site.OpenWeb();
    SPFile file = web.GetFile("./pages/default.aspx");
    file.CheckOut();
    file.Item["Title"] = "new title";
    file.Item.Update();
    file.CheckIn("title edited");
    

    using PowerShell

    [system.reflection.assembly]::loadwithpartialname("microsoft.sharepoint")
    $site= New-Object Microsoft.SharePoint.SPSite ("http://mysite")
    $web=$site.OpenWeb()
    $page =  $web.GetFile("./Pages/default.aspx")
    $page.CheckOut()
    $page.Item["Title"] = "new title"
    $page.item.update()
    $page.CheckIn("title edited")
    

    About

    Hojo Clement was working in US Technology in Trivandrum as a Senior Software Engineer. He has 6 years experience in working with Web Development Technologies inlcuding MOSS and ASP.net.

    One Response to 3 ways to edit SharePoint page properties

    1. Hans
      May 19, 2011 at 1:40 pm

      When you are using your browser to edit properties, you can do that in bulk (multiple items) too with this free tool on codeplex:

      http://sp2010batchedit.codeplex.com/

    Leave a Reply

    Your email address will not be published. Required fields are marked *