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

SharePoint 2010 change home page或者default page相关推荐

  1. 为SharePoint 2010创建Application Page

    如果不了解什么是Application Page,可以参考我以前写过的这篇文章.SharePoint 2010的页面模型没有太多的变化,基本和2007保持一致.对于开发人员而言,为SharePoint ...

  2. SharePoint基础之九- Site Page与Application Page

    在一个WSS站点中的某些页面, 比如说首页(default.aspx), 支持用户使用SharePoint Designer这样的工具进行定制化(customization). 支持定制化的页面叫做s ...

  3. SharePoint关于publish page, WiKi page, Web part page区别

    并非所有页面类型都相似 让我们来重新理解一下关于这三种页面的问题,自己找了很多文章并没有找到很好的介绍. 尽可能简单,SharePoint页面是您的用户内容显示的地方.您可以将其比喻成SharePoi ...

  4. How to set the Default Page in ASP.NET?

    How to set the Default Page in ASP.NET? Ask Question Asked 9 years, 7 months ago Active 3 months ago ...

  5. asp.net core设置默认起始页Default Page和重定向

    为什么80%的码农都做不了架构师?>>>    用Asp.Net Core的网站Deploy至IIS,因此找了下,发现两种方法: 添加引用 using System.Threadin ...

  6. sharepoint 2010 默认弹出模式窗口最大化default showModalDialog maximize

    记录一下如何在sharepoint 2010 弹出模式窗口最大化的方法. 前面提到关于sharepoint 2010 弹出模式窗口showModalDialog并返回值returnResult方法,知 ...

  7. SharePoint 2010中的客户端AJAX应用——ASP.NET AJAX模板

    WCF Data Services是SharePoint 2010中一个极具吸引力的新特性.然而,因为它的强大,直接对其进行编程仍然会有点痛苦.幸运的是,一个新的相关技术 -- ASP.Net AJA ...

  8. SharePoint 2010 技巧系列: 控制Ribbon菜单权限(SiteActions的例子)

    上一篇写了一个关于快速开发Ribbon菜单的例子,这次我们共同探讨一下Ribbon菜单权限的控制. 如果你已经阅读了 "", 我相信你已经能很快的开发一个Ribbon菜单,这时我们 ...

  9. sharepoint 2010 beta Workflow

    一.准备条件 系统:Windows  Server2008,Windows Server 2008 R2; 软件: 1.SharePoint Server 2010 Beta:http://www.m ...

最新文章

  1. 前端文件上传-javascript-ajax
  2. Flutter入门篇(一)
  3. 本地存储localStorage用法详解
  4. 网络仿真中数据生成相关
  5. Flink 1.12 资源管理新特性回顾
  6. android 跨进程点击方式总结
  7. IBM 技术文档:Spark, 快速数据分析的又一选择
  8. sqlserver2000与sqlserver2005驱动与url的区别
  9. it is not your reason to quit.
  10. 2018-2019金融周期下的武汉楼市和政策解析
  11. CSS 网页定位与布局
  12. Linux命名空间cgroups简介
  13. 互联网创新影院:5G有手机的地方就有电影院
  14. controller(控制器)
  15. 通过Xcodeproj深入探究Xcode工程文件
  16. 微信小程序实现扫码一键连wifl
  17. 删除maven仓库中的lastUpdated
  18. 电商小学期 - 智能家居网站结项报告
  19. Intellij IDEA 打包jar的多种方式
  20. php separator,PHP常量DIRECTORY_SEPARATOR原理及用法解析

热门文章

  1. css实验内容,12个令人惊叹的CSS实验项目
  2. php调用shell执行scp,Shell中使用scp命令实现文件上传代码
  3. vue树形多列_[vue]使用Element-ui的el-table实现多列同时排序。
  4. matlab中jet的例子,Python matplotlib.pyplot.jet()用法及代码示例
  5. 计算机电源原如何确定正常,打开计算机电源后,显示屏不会点亮. 显示器没有坏....
  6. dede后台title怎么修改的?去掉XXXX-织梦内容管理系统V5.7
  7. SQL Server中的事务与锁
  8. Codeforces Round #462 (Div. 2)题解
  9. 常用前端框架Angular和React的一些认识
  10. 关于ios app发布的中间证书的要求--解决WWDR证书过期方案