日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

SharePoint 2010 change home page或者default page

發布時間:2025/4/16 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 SharePoint 2010 change home page或者default page 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

SharePoint: How to change the default home page

?

I frequently get questions on changing the home page or using another page as the home page:

  • Can I have three (or four or five or…) columns in the default home page?
  • Do I have to use the new wiki home page in my Team Site?
  • I want to test a new home page design, but I don’t want to lose the existing home page… (just in case you know…)
  • How can I use a page from my wiki library as my home page?

Below are four ways to set another page as your home page: (all four work for both 2007 and 2010)

  • From Site Settings (If the publishing features are enabled)
  • From SharePoint Designer
  • From code / API
  • From PowerShell

The first two can be used by Site Owners, the second two can only be used for developers and administrators.

?

Important note for all four methods:

Make sure all of your users have at least read access to the new home page, and if in a library that you have it checked in and published.

?

If the publishing features are enabled for a site then:

Site Actions, Site Settings, Welcome Page

(that was easy!)

2007:

2010:

?

From SharePoint Designer:

Right-click the new page and click "Set as Home Page".? (For SharePoint 2007 this only appears to work from SharePoint Designer if the file is in the root of the site. I.e. the same place as default.aspx.)

?

Via the API:

C# and VB developers can use the SPFolder.WelcomePage property. See:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spfolder.welcomepage.aspx

?

Via PowerShell:

For SharePoint 2010:

$site = Get-SPSite http://yourserver/sites/yoursite $web = $site.RootWeb(or $web = $site.OpenWeb("yoursubsite") $folder = $web.RootFolder $folder.WelcomePage = "SitePages/home.aspx"(or $folder.WelcomePage = "default.aspx")(or $folder.WelcomePage = "Shared%20Documents/mycustomwebpartpage.aspx") $folder.update() $web.Dispose() $site.Dispose()

?

For SharePoint 2007 (the first two lines are different):

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") $site = New-Object Microsoft.SharePoint.SPSite("http://yourserver/sites/yoursite") $web = $site.RootWeb(or $web = $site.OpenWeb("yoursubsite") $folder = $web.RootFolder $folder.WelcomePage = "SitePages/home.aspx"(or $folder.WelcomePage = "default.aspx")(or $folder.WelcomePage = "Shared%20Documents/mycustomwebpartpage.aspx") $folder.update() $web.Dispose() $site.Dispose()

轉載于:https://www.cnblogs.com/ahghy/archive/2013/06/05/3119269.html

《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀

總結

以上是生活随笔為你收集整理的SharePoint 2010 change home page或者default page的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。