View ViewFormatting-Tile
This file contains 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
{ | |
"$schema": "https://developer.microsoft.com/json-schemas/sp/view-formatting.schema.json", | |
"tileProps": { | |
"hideSelection": true, | |
"hideListHeader": true, | |
"formatter": { | |
"elmType": "div", | |
"style": { | |
"display": "flex", | |
"flex-wrap": "wrap", |
View gist:501d32e1f8a1b862887838d98abab251
This file contains 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
<Field DisplayName="ChoiceField" FillInChoice="FALSE" Format="Dropdown" Name="ChoiceField" Title="ChoiceField" Type="MultiChoice" ID="{bfc3a23a-832b-4c4a-b9e3-254e3cb7917a}" SourceID="{fd155260-83fa-440e-85c7-ff9026d1b2ff}" StaticName="ChoiceField" ColName="ntext6" RowOrdinal="0" CustomFormatter="{ | |
"$schema": "", | |
"debugMode": true, | |
"elmType": "div", | |
"children": [ | |
{ | |
"elmType": "div", | |
"style": { | |
"display": "block", | |
"width": "100%","color":"blue" |
View ColumnFormatting.json
This file contains 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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"title": "CustomFormatter JSON", | |
"description": "CustomFormatter renderer for SharePoint lists", | |
"definitions": { | |
"customAction": { | |
"type": "object", | |
"additionalProperties": false, | |
"title": "Action object", | |
"description": "Action object for a custom action button", |
View SampleSChema
This file contains 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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"title": "CustomFormatter JSON", | |
"description": "CustomFormatter renderer for SharePoint lists", | |
"definitions": { | |
"customAction": { | |
"type": "object", | |
"additionalProperties": false, | |
"title": "Action object", | |
"description": "Action object for a custom action button", |
View SiteScriptSchema
This file contains 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
Schema |
View SiteScriptSchema
This file contains 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
{ | |
"$schema": "http://json-schema.org/draft-06/schema#", | |
"title": "JSON Schema for Site Scripts", | |
"description": "A SharePoint Site Script definition", | |
"definitions": { | |
"SPListSubactions": { | |
"setTitle": { | |
"type": "object", | |
"title": "Set the title", | |
"description": "Set the title of the list", |
View gist:d832cdc7fdb3d74c26e5df57303cc03c
This file contains 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
$sitedesign = Get-SPOSiteDesign | where {$_.Title -eq "Advanced Design"} | |
[System.Collections.ArrayList]$existingsitescripts = $sitedesign.SiteScriptIds | select -ExpandProperty Guid | |
$existingsitescripts.Add($sitescript.Id) | |
Set-SPOSiteDesign -Identity $sitedesign.Id -SiteScripts $existingsitescripts |
View Create new header for Article Page - PowerShell
This file contains 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
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client") | |
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Client.Runtime") | |
$admin = 'youraccount@tenant.OnMicrosoft.Com' | |
$password = Read-Host 'Enter Password' -AsSecureString | |
$context = New-Object Microsoft.SharePoint.Client.ClientContext("https://tenant.sharepoint.com/sites/testpnp"); | |
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($admin , $password) | |
$context.Credentials = $credentials |
View Create Custom Header for Article Page - C#
This file contains 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
using (var ctx = new OfficeDevPnP.Core.AuthenticationManager().GetAppOnlyAuthenticatedContext(newSiteUrl, clientId, clientSecret)) | |
{ | |
var pages = ctx.Web.Lists.GetByTitle("Site Pages"); | |
ctx.Load(pages); | |
//get template page | |
var templatePage = pages.RootFolder.GetFile("Project-Home.aspx").ListItemAllFields; | |
ctx.Load(templatePage); | |
ctx.ExecuteQuery(); | |
View gist:3bc2232b0445c14d3cdc55fc09e407f3
This file contains 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
$site = Get-SPSite http://siteColl | |
$site | Get-SPWeb -Limit ALL | ForEach-Object { | |
foreach ($list in $_.lists) | |
{ | |
$list["Title"] = "NewTitle" | |
$list.Update() | |
} | |
} | |
$site.Dispose() |