Modern SharePoint Online Programming - Chapter Twelve


Hi guys, let's explore all site footer customizations possible using the default OOTB features available on the Modern Sites.
As you all know, the site footer can be enabled using PowerShell or via a manual process on the Communication Sites or Communication Sites which get registered as Hub Sites but not supported on Modern Team Sites.
Manual Process 
Here is the manual process >> Go to your Modern Site >> Top Right Gear/Cog >>  Settings >> Change the Look >> Footer >> Toggle Footer Visibility On >> Upload your Custom Image from your Local Desk Top >> Add a cool Footer Name say like >> SharePoint.Net, etc.
After doing the above process all you will have a site footer available, along with the above image and footer title on the left-hand bottom corner. You still will have one editable option on the right bottom corner, the option to change it to a URL/Header Type.
What if we need more links for which we have to use PnP PowerShell to apply a Customizable SiteFooter.xml with all your Footer nodes represented in the Bottom-Top Order that get reflected in the Left-Right bottom Site Footer area.
Here is a PnP PowerShell code for applying it:
Connect to pnponline via the URL -use web login
Apply-PnPProvisioningTemplate -Path D:\SiteFooter2.xml
And here is the SiteFooter.xml code with all the Site Footer links/nodes included:
  1. <?xml version="1.0"?>  
  2.    <pnp:Provisioning xmlns:pnp="">  
  3.    <pnp:Preferences Generator="OfficeDevPnP.Core, Version=3.10.1906.0, Culture=neutral, PublicKeyToken=null" />  
  4.    <pnp:Templates ID="CONTAINER-TEMPLATE-349B964A1A644BA3A310BFA16668495E">  
  5.    <pnp:ProvisioningTemplate ID="TEMPLATE-349B964A1A644BA3A310BFA16668495E" Version="1" BaseSiteTemplate="SITEPAGEPUBLISHING#0" Scope="RootSite">  
  6.    <pnp:Footer Enabled="true" RemoveExistingNodes="true">  
  7.    <pnp:FooterLinks>  
  8.    <pnp:FooterLink DisplayName="©CrossShare 2020" Url="#" />  
  9.    <pnp:FooterLink DisplayName="Contact Us" Url="" />  
  10.    <pnp:FooterLink DisplayName="Help" Url="" />  
  11.    </pnp:FooterLinks>  
  12.    </pnp:Footer>  
  13.    </pnp:ProvisioningTemplate>  
  14.    </pnp:Templates>  
  15.    </pnp:Provisioning>  
  17. #I created 2 Modern Site Pages getting redirected to Contact-Us and Help page.  
You can also edit the site footer manually by clicking the Edit option and reordering the links or making few of them the header, etc. as per your new changes.
After following all the above processes, you will have a cool Site Footer available on your Modern Site as shown below:-
Site Footer can be more customizable with other kinds of mail or with Site Page with Virtual Agent/Bot OR Modern Site Pages Header without links etc. as per your choice. 
For more detailed understanding and practical concepts applying please go through my previous blogs which can be integrated with this SiteFooter and Modern Site Pages customization.
Use Visual Studio Code Editor for doing all the above code customizations for a better understanding with Intellisense. 
Sharing is Caring. Happy SharePointing!