I am developing master page. I don't want to show top ribbon and left navigation menu to user.
So I am hiding it using css
#s4-leftpanel,#s4-ribbonrow {
display:none !important;
}
The challenge I am facing is if I keep this css in master page. I am not able to create pages easily. Also not able to access ribbon.
So I created master page with both visible and created a page layout based on master page. and added this css to it. But again the same problem.
I need to make sure I can add webparts to any pages I create using the ribbon and access the left navigation. but not the users.
Any Suggestions?
if(_spPageContextInfo.userLoginName == "<adminLoginNamehere>"){$("#s4-ribbonrow).show();}
maybe