惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - sdxd.bgl

将SQL Server中的数据显示到SharePoint中 - sdxd.bgl 拓展训练总结 在PowerShell中,如何获取SharePoint的默认数据库服务器 恢复导出XSLT List View WebPart - sdxd.bgl 实战部署FAST Search Server 2010 for SharePoint Sharepoint开发中代码运行权限级别 在InfoPath中如何获取当前用户的信息(Profile) 晒晒我的家乡 关于模式的思考 小心委托 利用System.Linq.Expressions实现四则运算计算器(三) 利用System.Linq.Expressions实现四则运算计算器(二) 利用System.Linq.Expressions实现四则运算计算器(一) 初识System.Linq.Expressions 请拆招:将两个已排序集合分解成两个独立部分的集合和一个共有部分的集合? 如何实现Windows服务 用javascript实现下拉列表的自动筛选功能 - sdxd.bgl - 博客园 我的生活 电脑是个神奇的东西!
在SharePoint页面中如何显示来自其他网站的List
sdxd.bgl · 2011-09-30 · via 博客园 - sdxd.bgl

(作者:闪电,转载请注明出处

  为了方便用户使用,我们会把SharePoint网站设计成层次结构,并希望用户在主页上看到来自子网站的内容。比如希望把放在父网站的一个列表的内容显示在子网站的主页上面。这种需求看起来稀松平常,但实际上不容易。

  为了说明方便,我把列表所在的网站称为源网站,需要显示WebPart的网站称为目标网站。

  实现思路很简单:在源网站的页面上插入一个列表WebPart,然后导出该WebPart,在目标网站上,将刚导出的WebPart导入,之后在目标网站的页面上插入导入的WebPart。

  如何导出一个WebPart。首先打开页面,进入编辑模式,在WebPart右上角有个小三角,点开是一个菜单,有个命令"导出",页面会弹出保存WebPart文件,先把它保存到本地。

  如果没有导出命令怎么办?请看《恢复导出XSLT List View WebPart

  来一段小插曲,为了在其他网站能够使用该WebPart,需要修改下导出来的文件。用记事本打开它。找到<property name="WebId"节点,将源网站的WebID替换节点内容。WebID可以通过下面的PowerShell脚本获得。

if ((Get-PSSnapin | Where {$_.Name -eq "Microsoft.SharePoint.PowerShell"}) -eq $null)
{
Add-PSSnapin Microsoft.SharePoint.PowerShell;
}
$web = Get-SPWeb http://chenweifeng
Write-Output $web.ID

  为了能够在插入WebPart的时候能够选到刚才导出的WebPart,需要将刚才导出的WebPart上传到Web部件库中。Web部件库的地址是/catalogs/wp/ 。

  现在就可以在同一网站集的任何网站插入刚才的WebPart了!

  插入之后,还可以对该WebPart进行编辑。