Create empty sharepoint project then add empty element. Finally add below custom action for hiding copies tab of ribbon.
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id="DemoHideRibbonTab"
Location="CommandUI.Ribbon"
RegistrationId="101"
RegistrationType="List">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition
Location="Ribbon.Documents.Copies" />
</CommandUIDefinitions>
</CommandUIExtension>
</CustomAction>
</Elements>
If you hide entire ribbon in list page add below css
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Id="DemoHideRibbonTab"
Location="CommandUI.Ribbon"
RegistrationId="101"
RegistrationType="List">
<CommandUIExtension>
<CommandUIDefinitions>
<CommandUIDefinition
Location="Ribbon.Documents.Copies" />
</CommandUIDefinitions>
</CommandUIExtension>
</CustomAction>
</Elements>
If you hide entire ribbon in list page add below css
- <style type="text/css">
- #s4-ribbonrow{ display:none; }
- </style>
#s4-ribbonrow { display:none } –> top ribbon
#s4-leftpanel { display:none } –> left navigation
.s4-ca { margin-left:0px;background:transaparent} –> to keep the margin starting from the left or else you will find a blank space if you use only the above class
.s4-breadcrumb-top { display : none } –> breadcrumb
#s4-titlerow { display:none } –> top ba
#Ribbon\.ListItem\.New\.NewListItem-Large
{
display:none;
}
<style type=<span class="str">"text/css"</span>>
#Ribbon\.ListItem\.New\.NewListItem-Large
{
display:none;
}
</style>
<style type=<span class="str">"text/css"</span>>
#Ribbon\.ListItem\.Manage\.EditProperties-Large
{
display:none;
}
</style>
No comments:
Post a Comment