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...
Marc Vanderstraeten
Sep 04, 2018Copper Contributor
How do you make this redirect work. Can you provide a step-by-step approach?
Anonymous
Sep 04, 2018Yeah. Tomorrow when I get in. But it’s just a response redirect script web part on the homepage. Just make a 2nd blank page and put the redirect script on it. Then set it as homepage. That way you can always get back to your default.aspx if you have too. Anyway if you need more instruction let me know and I’ll do some screens and the script.
- 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
- Fountain_AbaniAug 20, 2019Copper ContributorThank 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
- 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
- KD10018Mar 26, 2019Copper 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.