How to turn Modern View back on in SharePoint Online

in #technology5 years ago

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).

Manual way


The first, and to me, the easiest way to do this is clear the cookies for the site.

  • Chrome: Push the F12 function key on your keyboard. Click the Application tab. In the sidebar, Under Cookies, right click the URL of the SharePoint Online site (https://tenant.sharepoint.com) and click Clear. Or if you want to get granular, find the cookie named splnu and clear it.
  • Internet Explorer: Press F12. Click on the tab labeled Network. In that tab, there is a button towards the middle top that looks like a cookie with a red X going through it that says Clear Cookies when you hover over it - click that.
  • Firefox: I don't use it. Figure it out yourself :)
Then refresh the page. You should now be looking at the SharePoint Modern view.

Javascript way

After doing trial and error, I found the cookie that controls this is named spnlu. I wrote a one liner JS code that accomplishes this automagically.

Turn on the SharePoint Modern Layout:

document.cookie = "splnu = 1; path=/"
Turn off the SharePoint Modern Layout and return to SharePoint Classic:
document.cookie = "splnu = 0; path=/"

Button

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.
<script>
  function set_spnlu_cookie() {
    document.cookie = 'splnu = 1; path=/';
  }
</script>
<input type="button" onclick="set_spnlu_cookie()" Value="Switch to Modern Layout"></input>
 

Let me know if you have a better method or a workaround you found that works for you.


Originally posted at https://moreabout.tech/how-to-turn-modern-view-back-on-in-sharepoint-online/

Sort:  

✅ Enjoy the vote! For more amazing content, please follow @themadcurator for a chance to receive more free votes!

Coin Marketplace

STEEM 0.28
TRX 0.11
JST 0.031
BTC 69371.89
ETH 3768.85
USDT 1.00
SBD 3.71