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
Deleted
Sep 04, 2018There ya go. Even better way ;).