How to Apply Company Theme and manage Global Nav and Footer Links using PnP for Communication Sites

%3CLINGO-SUB%20id%3D%22lingo-sub-530687%22%20slang%3D%22en-US%22%3EHow%20to%20Apply%20Company%20Theme%20and%20manage%20Global%20Nav%20and%20Footer%20Links%20using%20PnP%20for%20Communication%20Sites%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-530687%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20doing%20Site%20Design%20provisioning%20via%20PnP%20Template%20and%20Azure%20Automation%20Powershell.%20However%2C%20I%20find%20that%20the%20generated%20template%20is%20incomplete%20and%20I%20need%20to%20do%20the%20following%20things%20manually%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CUL%3E%3CLI%3EManage%20Global%20navigation%3CUL%3E%3CLI%3ERemove%20default%20%22Home%22%20link%3C%2FLI%3E%3CLI%3ERemove%20default%20%22Site%20Contents%22%20link%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3CLI%3EChange%20the%20Look%20%5BTheme%5D%3CUL%3E%3CLI%3EApply%20Company%20Theme%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3CLI%3EChange%20the%20look%20%5BHeader%5D%3CUL%3E%3CLI%3ESet%20to%20use%20Background%204th%20option%3C%2FLI%3E%3CLI%3EUpload%20Site%20Logo%20to%20Site%20Assets%20folder%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3CLI%3EChange%20the%20look%20%5BNavigation%5D%3CUL%3E%3CLI%3ESet%20to%20use%20%22Cascading%22%20instead%20of%20Megamenu%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3CLI%3EChange%20the%20look%20%5BFooter%5D%3CUL%3E%3CLI%3ESet%20Footer%20Name%20Visibility%20to%20show%20and%20populate%20Footer%20Name%3C%2FLI%3E%3CLI%3EPopulate%20Footer%20Links%3C%2FLI%3E%3C%2FUL%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3ESo%20far%2C%20the%20only%20thing%20I%20was%20able%20to%20automate%20was%20showing%20the%20footer%2C%20but%20I%20haven't%20found%20any%20code%20for%20the%20rest.%20I%20tried%20the%20Remove-PnPNavigationNode%20command%20but%20it%20seems%20it%20doesn't%20work%20for%20Communication%20Sites.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20any%20way%20for%20me%20to%20automate%20the%20above%20manual%20tasks%20using%20PnP%20PowerShell%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

I am doing Site Design provisioning via PnP Template and Azure Automation Powershell. However, I find that the generated template is incomplete and I need to do the following things manually:

 

  • Manage Global navigation
    • Remove default "Home" link
    • Remove default "Site Contents" link
  • Change the Look [Theme]
    • Apply Company Theme
  • Change the look [Header]
    • Set to use Background 4th option
    • Upload Site Logo to Site Assets folder
  • Change the look [Navigation]
    • Set to use "Cascading" instead of Megamenu
  • Change the look [Footer]
    • Set Footer Name Visibility to show and populate Footer Name
    • Populate Footer Links

So far, the only thing I was able to automate was showing the footer, but I haven't found any code for the rest. I tried the Remove-PnPNavigationNode command but it seems it doesn't work for Communication Sites.

 

Is there any way for me to automate the above manual tasks using PnP PowerShell?

0 Replies