0

My target is to hide the ribbon for visitors. For site owners it needs to be visible. I googled around and find something like this below. Is this also working on pages or only in masterpages?

<Sharepoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl2" runat="server" PermissionsString="AddListItems">
        <script type="text/javascript">
        document.getElementById("s4-ribbonrow").style.display = "block";
        </script>
    </Sharepoint:SPSecurityTrimmedControl>

If this is not working in pages, is there some other solution to hide the ribbon only for visitors?

I am not looking for a development solution. Just something in spd or javascript or sometething?

  • It is working on pages, but ribbon is not added in the page layout but in the masterpage – Robert Lindgren Nov 20 '14 at 13:32
  • so, how can I implement a solution to hide the ribbon only on 1 page? – Ola Nov 20 '14 at 13:43
  • You could have your own control that iterates all controls from code behind, and find ribbon and based on a condition (like permissions) hide or show it. – Robert Lindgren Nov 20 '14 at 13:47
  • I am not looking for a development solution. Just something in spd or javascript or sometething? – Ola Nov 20 '14 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.