Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. Steps:
  2.  
  3. SiteActions (gear icon) > Edit page
  4. From Ribbon: Insert > WebPart
  5. Category: Media and content > ScriptEditor
  6. From webpart: Edit WebPart -> 'edit fragment' appears
  7. Edit Fragment: opens dialog box; insert all-in-one code, below
  8. Click 'Insert'
  9.  
  10. All-in-one:
  11.  
  12. <style type="text/css">
  13. #sideNavBox { display: none }
  14. #contentBox { margin-left: 25px }
  15. #titleAreaBox #SearchBox {display: none !important;}
  16. #DeltaPlaceHolderPageTitleInTitleArea {display: none !important;}
  17. #suiteBar {display: none !important;}
  18. #s4-ribbonrow {display: none !important;}
  19. </style>
  20.  
  21. <style type="text/css">
  22. <!-- hide quick launch left menu -->
  23. #sideNavBox { display: none }
  24. <!-- move page content to the left side of the page, in the space where the sideNavBox was -->
  25. #contentBox { margin-left: 25px }
  26. <!-- hide search box (nestled within the titleAreaBox) -->
  27. #titleAreaBox #SearchBox {display: none !important;}
  28. <!-- hide pagetitle (useful when using a url that differs from the pagetitle) -->
  29. #DeltaPlaceHolderPageTitleInTitleArea {display: none !important;}
  30. <!-- hide topbar (SharePoint, Newsfeed, OneDrive, Sites, [username], settings-cog, help) -->
  31. #suiteBar {display: none !important;}
  32. <!-- hide 2nd topbar (browse, item/page/library, share, follow, sync, edit, fullscreen) -->
  33. #s4-ribbonrow {display: none !important;}
  34. </style>
  35.  
  36. When committing these changes, the last item in the list (s4-ribbonrow) will hide your 'edit' button. In order to be able to edit the page once it's hidden, append the following url-part after the url of the page:
  37.  
  38. ?ToolPaneView=2&pagemode=edit
  39.  
  40. This will allow you to edit the scripteditor webpart, temporarily remove the lines that hide the ribbon, and thus give you back your 'edit' link. Make sure when you're done to save the page before adding these lines back in the webpart.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement