Posts

Showing posts from 2018

Scoped Bootstrap for SharePoint

I've got a project for a client that involves refactoring a lot of bad choices related to SharePoint branding in Classic mode sites.   (While I'm enthusiastic about the Modern Sites and new techniques using SPFx extensions, most of our customers are slow on the uptake). I've had to do this a few times and this blog explains it perfectly, but due to some formatting issues over there and a desire for just the steps as I need to update/repeat this, I've summarized here: Open up a node capable command prompt (I use cmd) Create a directory for your solution (e.g. C:\Repos\ScopedBootstrap) Run npm install bootstrap@3.3.7 (or whatever version you need to work with) Go into the node_modules\bootstrap\less directory  Open bootstrap.less in VS Code. Place  .YourUniqueClassName{  before all the @import statements and close the curly brace at the end of the file. Go back to the ..\bootstrap directory (in node_modules) Run npm install to install the dependencies Run

Switching between on-prem and SharePoint Online versions of PnP Powershell Commands

I've updated my original post to just link to these instructions. This is a better way of doing it as you're explicitly loading the specific commands each time you need to run them, that way you're clear on which version you're using: https://www.erwinmcm.com/running-the-various-versions-of-pnp-powershell-side-by-side/   I use the PnP Powershell commands very frequently, but mostly only for SP Online.   Lately I've been working on a SP2013 customization and wanted to use the PnP PowerShell commands for SP2013. If you have multiple version of the commands installed then you'll need to select which one you want to use. This thread explains that you need to clear your PSMODULEPATH environment variables but then you'll need to an import-module when you need to work with a particular version.  Follow this guidance first:  https://github.com/SharePoint/PnP-PowerShell/issues/1356 Doing that is fine if you don't mind retyping your module path in the i