Forum Discussion
Unable to add custom template to a new modern site connected to a modern Hub
- Jun 27, 2019
Well folks, I answered my own question thru much trial and error, so I am posting what I did to fix this.
- Used SharePoint Admin center's classic experience to enable custom scripting at the tenant level
- This is not yet avail in the modern, so you have to switch back to classic temporarily for this
- Used this https://sharepoint.handsontek.net/2018/10/28/enable-custom-script-on-modern-sharepoint-sites-using-powershell/ to allow custom scripting on the Hub collection's primary landing site.
- I used most of https://sharepointmaven.com/how-to-create-sites-and-site-collections-from-a-sharepoint-site-template/ to load the template and create the site PMdevTestSiteCollection01.
- After finishing the HOW TO CREATE A SHAREPOINT SITE COLLECTION FROM THE SITE TEMPLATE instructions, I switched back to the SharePoint Admin center's modern experience and edited the Hub site association to align it with my modern hub.
This is a modern project site, connected to a hub collection in 365 online using the a custom template! Woo-hoo!!
The Hub navigation top bar is not on every page of the site, and the Quick Launch is being weird, closing menus inconsistently… but the bulk of the webparts that I wanted from the template have been applied. The page edit features seem to be a mixed bag of classic and modern, likely b/c the template was created in the classic experience. I'm not sure there's a way to edit the Hub navigation easily in the new project site's landing page's interface. There is likely a way to do this in PowerShell or JavaScript I'm guessing.
If I'm worried about security & leaving allowance for the custom scripting, I can turn all of that back off. At the tenant level I can do this in the SP Admin Center classic experience. At the site level I can run some PowerShell code to turn it off. I believe the custom scripting only needed to be enabled to allow the template to apply during site creation.
This is definitely connected to a modern Hub site collection according to the SP Admin Center. Parts of it feel classic and parts of it feel modern. It's like a hybrid site. I did some hub level searching on my Hub's landing page and it pulls data in search queries seamlessly out of the hybrid site. Some of the pages have a modern feel including the Hub top link navigation and the edit tools are modern.
This is definitely a site collection and not a sub-site, because /sites/ is in the URL
The only thing that's a bummer and I will have to research more is this hybrid site doesn't have an Office 365 Group alignment. I don't see an easy way to edit this. It might require Power Shell.
Well folks, I answered my own question thru much trial and error, so I am posting what I did to fix this.
- Used SharePoint Admin center's classic experience to enable custom scripting at the tenant level
- This is not yet avail in the modern, so you have to switch back to classic temporarily for this
- Used this https://sharepoint.handsontek.net/2018/10/28/enable-custom-script-on-modern-sharepoint-sites-using-powershell/ to allow custom scripting on the Hub collection's primary landing site.
- I used most of https://sharepointmaven.com/how-to-create-sites-and-site-collections-from-a-sharepoint-site-template/ to load the template and create the site PMdevTestSiteCollection01.
- After finishing the HOW TO CREATE A SHAREPOINT SITE COLLECTION FROM THE SITE TEMPLATE instructions, I switched back to the SharePoint Admin center's modern experience and edited the Hub site association to align it with my modern hub.
This is a modern project site, connected to a hub collection in 365 online using the a custom template! Woo-hoo!!
The Hub navigation top bar is not on every page of the site, and the Quick Launch is being weird, closing menus inconsistently… but the bulk of the webparts that I wanted from the template have been applied. The page edit features seem to be a mixed bag of classic and modern, likely b/c the template was created in the classic experience. I'm not sure there's a way to edit the Hub navigation easily in the new project site's landing page's interface. There is likely a way to do this in PowerShell or JavaScript I'm guessing.
If I'm worried about security & leaving allowance for the custom scripting, I can turn all of that back off. At the tenant level I can do this in the SP Admin Center classic experience. At the site level I can run some PowerShell code to turn it off. I believe the custom scripting only needed to be enabled to allow the template to apply during site creation.
This is definitely connected to a modern Hub site collection according to the SP Admin Center. Parts of it feel classic and parts of it feel modern. It's like a hybrid site. I did some hub level searching on my Hub's landing page and it pulls data in search queries seamlessly out of the hybrid site. Some of the pages have a modern feel including the Hub top link navigation and the edit tools are modern.
This is definitely a site collection and not a sub-site, because /sites/ is in the URL
The only thing that's a bummer and I will have to research more is this hybrid site doesn't have an Office 365 Group alignment. I don't see an easy way to edit this. It might require Power Shell.