Forum Discussion
Convert Classic root site to Communication site
How do you make this redirect work. Can you provide a step-by-step approach?
- Ravi ChandraSep 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
- DeletedSep 04, 2018There ya go. Even better way ;).
- KD10018Mar 26, 2019Brass Contributor
Ravi Chandra Where exactly is the code going please? Site Settings > Site contents > New page > Add web part "Code snippet" > paste in code? This is the more apparent place to create a new page; not sure if there is a different place to add maybe a classic page or if this type of page is alright.
- dniteJun 05, 2019Copper Contributor
Hello,
I have root site with template publishing and another 50 subsites (below) with teams template (modern or classic ) . If i want to change only the root site template to communication without affecting the rest of the sub-sites how to proceed ?
Thank you