How to turn Modern View back on in SharePoint Online
technology·@moreabout.tech·
0.000 HBDHow to turn Modern View back on in SharePoint Online
When we first switched to SharePoint Online, I loved the new view! The only problem was as an administrator, I needed to switch back to the classic view to manage some parts of a list that wasn't available in the new look. I could not find a button that allowed me to just switch back. After looking up some blog posts, I found that people said to simply log off and log back on. However, this did not work for me. Here are some other ways I found to do it, and some more "advanced" ways to do this, as well as a way to script it (or add a button for end users). <h2>Manual way</h2> The first, and to me, the easiest way to do this is clear the cookies for the site. <ul> <li>Chrome: Push the <strong>F12</strong> function key on your keyboard. Click the <strong>Application</strong> tab. In the sidebar, Under <strong>Cookies</strong>, right click the URL of the SharePoint Online site (https://tenant.sharepoint.com) and click <strong>Clear</strong>. Or if you want to get granular, find the cookie named <strong>splnu </strong>and clear it.</li> <li>Internet Explorer: Press <strong>F12</strong>. Click on the tab labeled <strong>Network</strong>. In that tab, there is a button towards the middle top that looks like a cookie with a red <strong>X</strong> going through it that says <strong>Clear Cookies</strong> when you hover over it - click that.</li> <li>Firefox: I don't use it. Figure it out yourself :)</li> </ul> Then refresh the page. You should now be looking at the SharePoint Modern view. <h2>Javascript way</h2> After doing trial and error, I found the cookie that controls this is named <strong>spnlu</strong>. I wrote a one liner JS code that accomplishes this automagically. Turn on the SharePoint Modern Layout: <pre class="lang:js decode:true" title="Set cookie to view SharePoint Modern Layout">document.cookie = "splnu = 1; path=/"</pre> Turn off the SharePoint Modern Layout and return to SharePoint Classic: <pre class="lang:default decode:true" title="Turn off SharePoint Modern Layout and return to SharePoint Classic Layout">document.cookie = "splnu = 0; path=/"</pre> <h2>Button</h2> Let's face it, to tell an end user to open the JavaScript Console and run a command would not be easy. To make it easy on the user, simply create a button that sets the cookie for them to switch them to the new view. You can even get as elaborate as refreshing the page for the user. <pre class="lang:js decode:true " title="Button to switch user to Modern Layout"><script> function set_spnlu_cookie() { document.cookie = 'splnu = 1; path=/'; } </script> <input type="button" onclick="set_spnlu_cookie()" Value="Switch to Modern Layout"></input></pre> Let me know if you have a better method or a workaround you found that works for you. <br /><center><hr/><em>Originally posted at </a> https://moreabout.tech/how-to-turn-modern-view-back-on-in-sharepoint-online/ </em><hr/></center>