Created
March 13, 2017 15:04
-
-
Save chrisobriensp/f0fa4e02c1290094c64a09ed1a005a78 to your computer and use it in GitHub Desktop.
Shows adding modern web parts to a page and setting properties..
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // add video embed web part.. | |
| ClientSideWebPart videoEmbedWp = page.InstantiateDefaultWebPart(DefaultClientSideWebParts.VideoEmbed); | |
| videoEmbedWp.Properties["videoSource"] = "https://chrisobriensp.sharepoint.com/portals/hub/_layouts/15/PointPublishing.aspx?app=video&p=p&chid=4b7ef33e-ed56-4c75-b3ad-61488cc82474&vid=1e07b31d-21fa-4326-9033-91adf1a90708"; | |
| videoEmbedWp.Properties["captionText"] = "ALM video"; | |
| videoEmbedWp.Properties["showInfo"] = false; | |
| videoEmbedWp.Properties["embedCode"] = "<iframe width=853 height=480 src='https://chrisobriensp.sharepoint.com/portals/hub/_layouts/15/VideoEmbedHost.aspx?chId=4b7ef33e%2Ded56%2D4c75%2Db3ad%2D61488cc82474&vId=1e07b31d%2D21fa%2D4326%2D9033%2D91adf1a90708&width=853&height=480&autoPlay=false&showInfo=true' allowfullscreen></iframe>"; | |
| videoEmbedWp.Title = "Associated video"; | |
| page.AddControl(videoEmbedWp); | |
| // add Yammer embed web part.. | |
| ClientSideWebPart yammerEmbedWp = page.InstantiateDefaultWebPart(DefaultClientSideWebParts.YammerEmbed); | |
| yammerEmbedWp.Properties["yammerFeedURL"] = "https://www.yammer.com/chrisobrien.com/#/threads/inGroup?type=in_group&feedId=4059924&view=all"; | |
| yammerEmbedWp.Title = "Associated Yammer group"; | |
| page.AddControl(yammerEmbedWp); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
YammerEmbed webpart , By setting yammerFeedURL properties it will add classic webpart ,New webpart accept only yammer group name.
How we can only provide group name only , Which property need to set with groupname