【发布时间】:2020-11-07 02:04:36
【问题描述】:
使用 powershell,将 webpart(图像)添加到列表视图页面,例如AllItems.aspx.
当我将 webpart 添加到站点页面时,此代码是可以的,但是在列表中可以做什么/如何做同样的事情
$mySite = Get-PnPClientSidePage -Identity "TestWP.aspx"
$jsonProp = '{
"imageSourceType":0,
"imageSource":"https://MMMMMM.sharepoint.com/sites/pwa/SiteAssets/img01.jpg",
"captionText":" ",
"altText":" ",
"linkUrl":"",
"overlayText":"",
"fileName":"",
"siteId":"",
"webId":"",
"listId":"",
"uniqueId":"",
"imgWidth":"100%",
"imgHeight":"100%"
}'
Add-PnPClientSideWebPart -Page $mySite -Section 1 -Column 1 -Order 1 -DefaultWebPartType Image -WebPartProperties $jsonProp
【问题讨论】:
-
欢迎来到 StackOverflow!您能否向我们提供有关您的问题的更多详细信息?
标签: powershell listview sharepoint office365 web-parts