Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Hiding Site Actions Menu

  Asked By: Ariel    Date: Nov 26    Category: Sharepoint    Views: 16639

I searched alot of articles only to find that Site Actions menu can be hide by

1) Changing Master Page
2) By overriding CustomSiteActions.xml found under Master Page Gellery >
Editing Menu.

in short, I didn't find how to do it using feature.

I have a custom site definition and I want Site Actions to be hidden from all
Sites generated from this definition.

has any experiences this before?



6 Answers Found

Answer #1    Answered By: Mike Lamb     Answered On: Nov 26

The obvious first question would be WHY? If you hide  the site  Actions menu  then
you won't be able to administer the site without manually navigating to
http://server/site/_Layouts/Settings.aspx. Hiding the menu won't keep people
from going there just make it more difficult. The Site Actions menu
automatically doesn't show for anyone with ReadOnly access to the site. For
Contributors you can write a feature  that removes and/or replaces the links on
the menu with other things. In that feature you can change the security
permissions for menu entries in the list. It would be better to modify the
menu, rather than remove it. If you must remove it then the way to do it when
creating a custom  site definition  would be to remove it by creating a custom
masterpage that doesn't include the menu and setting that as the default master
page for the site definition.

Answer #2    Answered By: Jose Scott     Answered On: Nov 26

Create a Content Editor WebPart on the page  and add the following to the Source
Editor portion:
<script type="text/javascript"
<script type="text/javascript">



Hide the CEWP under Layout in the WebPart Properties. Check the Hidden checkbox.

Save the site  Template with the WebPart attached.

Answer #3    Answered By: Taylor Clark     Answered On: Nov 26

You can also use SPSecurityTrimmerdControl wrap around the SiteActions control
in the master  page.

<SharePoint:SPSecurityTrimmedControl PermissionsString="AddAndCustomizePages,
ManageLists" runat="server">

This way only site  owners are able to see the site action menu.

Answer #4    Answered By: Anthony Rutledge     Answered On: Nov 26

yes it is indeed possible, a security trimmed wrap around the control in master
page, but what I am looking was a feature  to add/remove site  actions.

I am trying to avoid a new master  page due to maintenence issues in branding.

Answer #5    Answered By: Heena Nagori     Answered On: Nov 26

You can't remove it with a feature  and wrapping it in a Security Trimmed Control
will undermine the performance gain you normally get from caching. The menu
should be security trimmed when you click on it, otherwise you will invalidate
the cache whenever a different user hits the page.

Didn't find what you were looking for? Find more on Hiding Site Actions Menu Or get search suggestion and latest updates.