Posts

Showing posts from June, 2019

How to add webPart to Page with PowerShell from WebPart Gallery

https://sharepoint.stackexchange.com/questions/233319/how-to-add-webpart-to-page-with-powershell-from-webpart-gallery #ensure that you use the site collection root url #if you use subsite url, will throw error since webpart gallery #exists only in the site collection root site $web = Get - SPWeb "https://site-collection-url" $pubWeb = [ Microsoft . SharePoint . Publishing . PublishingWeb ]:: GetPublishingWeb ( $web ) $publishingPage = $pubWeb . GetPublishingPage ( "https://site-collection-url/Pages/Test.aspx" ); $publishingPage . CheckOut (); $list = $web . Lists [ "Web Part Gallery" ] #use the webpart title or the .webpart file name $wpl = $list . Items | where { $_ . Title - eq "Your Webpart Name" } $xmlReader = New - Object System . Xml . XmlTextReader ( $wpl . File . OpenBinaryStream ()); $errorMsg = "" $wpManager = $publishingPage . ListItem . File . GetLimitedWebPartManager ([ S...

HTTP 404 Not Found Error with .woff or .woff2 Font Files

https://hotcakescommerce.zendesk.com/hc/en-us/articles/210926903-HTTP-404-Not-Found-Error-with-woff-or-woff2-Font-Files https://weblog.west-wind.com/posts/2016/jan/25/fontawesome-fonts-and-mime-types-in-iis-and-other-web-servers <system.webServer> < staticContent > < clientCache cacheControlCustom = " public " cacheControlMode = " UseMaxAge " cacheControlMaxAge = " 365.00:00:00 " /> < remove fileExtension = " .woff " /> < remove fileExtension = " .woff2 " /> < mimeMap fileExtension = " .woff " mimeType = " application/x-font-woff " /> < mimeMap fileExtension = " .woff2 " mimeType = " application/font-woff2 " /> </ staticContent > < modules >