博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
SharePoint 2010 change home page或者default page
阅读量:5992 次
发布时间:2019-06-20

本文共 2336 字,大约阅读时间需要 7 分钟。

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:

image

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.)

image

 

Via the API:

C# and VB developers can use the SPFolder.WelcomePage property. See:

 

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

你可能感兴趣的文章
从零开始学Xamarin.Forms(二) 环境搭建、创建项目
查看>>
js 动态 activex 组件
查看>>
--@angularJS--路由、模块、依赖注入
查看>>
(十一) 一起学 Unix 环境高级编程 (APUE) 之 高级 IO
查看>>
用c#开发微信(3)基于Senparc.Weixin框架的接收普通消息处理 (源码下载)
查看>>
ODAC (V9.5.15) 学习笔记(二十一)数据复制
查看>>
Cocos2d-x场景功能描述的生命周期
查看>>
nim的引用和指针
查看>>
rdlc部署zt
查看>>
maven 完整的settings.xml
查看>>
ios开发FMDB导入SQLCipher加密数据库
查看>>
Atitit.异常的设计原理与 策略处理 java 最佳实践 p93
查看>>
SpringMVC Ajax返回的请求json的方式来解决在中国字符串乱码问题
查看>>
[推荐]Bitnami 开源软件包安装解决方案
查看>>
Android:改变Activity切换方式
查看>>
小tips: 使用 等空格实现最小成本中文对齐
查看>>
android最新的工具DateHelper
查看>>
git获取远端版本库上的Tag (没有clone[远端的版本库太大了])
查看>>
task可声明参数 z
查看>>
WindowState注意事项
查看>>