Forum Discussion
Ravi Chandra
Jul 07, 2018Copper Contributor
Convert Classic root site to Communication site
In our recent intranet projects, we recommend users to go with main Intranet site using communication site template and we expect that to be the root site collection of the tenant. The issue is ever...
Ravi Chandra
Sep 04, 2018Copper Contributor
Super simple...
On the root site collection add a classic page and add a script editor webpart. Paste the below code. Update the site URL.
=================================
<script>
var wikiInEditMode = document.forms[MSOWebPartPageFormName]._wikiPageMode.value;
if (wikiInEditMode == "Edit")
{
// wiki page is in edit mode
}
else
{
// wiki page is not in edit mode
location.href = 'NEW SITE URL';
}
</script>
===========================================
Ravi
Fountain_Abani
Aug 20, 2019Copper Contributor
Thank you so much for sharing this. It worked for me and I have now redirected people to the new Modern SharePoint site I created for the Home of my client's intranet