These are the two ways to hide the Site actions .

  1. If you want to restrict the SiteActions based on the user permission we can do via “SharePoint:SecurityTrimmingcontrol”

(eg)

<Sharepoint:SPSecurityTrimmedControl runat=”server” Permissions=”AddAndCustomizePages”> SiteActions Code </Sharepoint:SPSecurityTrimmedControl>

This control Hide Ribbon for Anonymous Users – Only the editor if logged in would be able to see the ribbon.

2. Direct method to hide the SiteActions to all users including the Full Control permission users using css like below.

.ms-siteactionsmenu{display:none;}

Advertisements