Tag Info

Hot answers tagged

6

Nicholas, The SharePoint 2010 ribbon is kind of a double-edged sword. I have seen many business users asking for "not having" the ribbon for the sake of branding. Then there were instances when people needed some extended administrative sections in SharePoint sites without the ribbon. The fact is no matter what you do, without the ribbon there are numerous ...


6

You can specify Location="CommandUI.Ribbon.ListView" and RegistrationType="ContentType" with ID set to 0x01 for custom button to appear on ListView pages of all the lists. <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="ShowHelloWorldButton" ...


5

Site Actions -> Navigation -> Show and Hide Ribbon Setting Make "Show Ribbon" and "Hide Ribbon" commands available to No should prevent the ribbon from disabling and requiring folks to enable it. It should also make it available all the time for everyone.


4

All the ribbon definitions are stored in this file: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL\XML\CMDUI.XML Action JS code for most of these ribbon elements you can find here: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\SP.Ribbon.debug.js Actions for ...


4

This is afaik the only way to do it SECURELY the ajax answer on that page is a bad example however of how to acheive this, the accepted answer is the correct way: Hiding buttons of the Ribbon Bar


3

AFAIK the "i like it" controls are not part of the ribbon? If you want to replace the controls, you can create a custom control that inherits from SocialNotificationBase and render your own content in the OnLoad control public class ReitanSocialNotification : SocialNotificationBase { public ReitanSocialNotification() { ...


3

First of all there is no document set library in SharePoint. There is only a content type that is called "Document Set" and this can exists on certain document libraries. You need in to use in your declaration the RegistrationType="ContentType" and for the RegistrationId="0x0120D520". Last one is the id of the content Type "Document Set". The required ...


3

Have you added another Webpart to the AllItems Section? I get this behavior as soon as I add any Webpart to a View. Removing all other webparts except for the List View Webpart itself should bring you back the desired behavior. UPDATE This answer describes a way to get things actually working. Putting the mentioned code inside a $(function() {...}) ...


3

Maybe the sequence number of the Group and Button tags isn't correct. SharePoint sequence numbers of default controls are based on multiples of 10. So to avoid collisions try changing the sequence number of the Group tag to 52 and the sequence number of the Button tag to 15 (For example). EDIT: You need to change the Size attribute in the MaxSize tag to ...


3

Create a JS file (HideScript.js) and paste the following code in it, which hides the ribbon for a certain page. Upload the JS file to some document library for e.g. "SiteAssets" function HideRibbon() { $("#s4-ribbonrow").hide(); var newHeight = $(document).height(); if ($.browser.msie) {newHeight = newHeight - 3; } ...


3

Yes it is possible, check this tutorial out that is demonstrating how to create a Visual WebPart as a Text editor and it's also connected to Ribbon as claimed by author, however it's for SharePoint 2010 but I am pretty sure it will work as it is or with some changes for SharePoint 2013 as well. Develop a custom editable Visual Web Part (WebPart) Helpful ...


2

Not in then xml, but when you create ribbon buttons you specify javascript to execute when clicked. You then have two options: Use Client Object Model in this javascript to retrieve the property and do the navigation Navigate to a trampolin page which reads the property and redirects


2

best way is to call the Form for it. Here is an JS example for a Folder (call Newfolder() as Ribbon command) Maybe add a callback for refreshing: var PAGETYPE = { ItemDisplay: 4, ItemEdit: 6, ItemNew: 8 }; var baseListFormUrl = "/_layouts/listform.aspx?"; var FolderConTypeID = "0x0120003128620337CAC849BF2F80A5409ED9C300660E3D59C0C720448BF2EC9937D387A6"; ...


2

I had a similar problem to above - the ribbon options were grey (gray) when I showed a list item using a Rendering Template. The ribbon also showed a lot more options than you usually see when viewing an item. My soltuion was simple though: I'd forgotton to include this line in the template: <SharePoint:FormToolBar runat="server"/> Once in the ...


2

Infact, I was also actually facing the same issue. So, I dig up the source of the page and found the interesting stuff in init.js (Sharepoint provided script file) script. There is a parameter called InitialTabId set to different default values according to different pages. Thats why you see different modes on different pages where on one page either ...


2

Copy the following XML into Feature's Elements.xml and try to play with params. The location is CommandUI.Ribbon.ListView <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <CustomAction Id="ShowHelloWorldButton" RegistrationType="List" RegistrationId="100" ...


2

Use __doPostback method on the client: __doPostback('myPostBack',''); Then, on server you should have something like this: const string myPostBackId = "myPostBack"; public override CreateChildControls() { // ... if (this.Page.Request["__EVENTTARGET"] == myPostbackId) { string textBoxValue = this.Page.Request["__EVENTARGUMENT"]; ...


2

Figured this one out...what I did was create a Security Trimmed Control using this code: <Sharepoint:SPSecurityTrimmedControl runat="server" Permissions="ViewPages"> <div id="blank-ribbon" class="custom-blank-ribbon"> </div> </SharePoint:SPSecurityTrimmedControl> the code goes in the masterpage Then I styled the ...


2

If you want to perform postbacks from ribbon controls, there are at least two options: Use SPRibbonPostBackCommand in conjunction with implementing IPostBackEventHandler interface for your control (server-side both) Use __doPostBack in JS, and then Page.Request["__EVENTTARGET"] server-side Let me explain both approaches in detail. 1. ...


2

Ok I found the solution with this modified xml I did achieve expected results: <CustomAction Id="Ribbon.ListItem.TagsAndNotes.NewLike" Location="CommandUI.Ribbon" Title="New version of I Like It"> <CommandUIExtension> <CommandUIDefinitions> <CommandUIDefinition ...


2

All you need to do is to follow these steps :) Open the master page, find the div tag: Put the following around it: <Sharepoint:SPSecurityTrimmedControl runat="server" Permissions="ManageWeb"> <div id="s4-ribbonrow" …</div> </SharePoint:SPSecurityTrimmedControl> or you can follow this Blog, it shows you three ways of doing it ...


2

If this is a publishing site (like i think you said it is), each user can decide whether to hide or display the ribbon. Maybe one user has selected to show it and the other one has decided to hide it. See this old question for some screenshots: automatically show ribbon on publishing site EDIT: Are both users in the Site Members group? See this ...


2

You can use C# Ribbon libraries to generate your Ribbon controls and then you can put the logic in 1 place and call it 17 times. Please take a look at following libraries: http://qaspribbon.codeplex.com/ http://spribbon.codeplex.com/


2

You seriously do not want to start messing with the Ribbon in this way. That critter is like a great white and once you tangle with it, you will bleed for years from places you didn't know existed. Trust me on this: I have the scars to prove it. If you need to add or remove things from the ribbon, follow the XML Feature examples on the web or use the ...


1

You usually don't want to make the commands or javascript functions unique, what you want is some way for them to figure out what to work on. This can very much depend on what you want them to do. What should the ribbon do when there is one web part on the page? What should it do when there is two or more? If the ribbon works on a single web part then ...


1

The error in the example code is: <!-- Remove the Planned check box for planned work in the Show/Hide group. --> < Id="Ribbon.ContextualTabs.TiedMode.Home.ShowHide.PlannedWork" Location="CommandUI.Ribbon" Title="Hides the Planned check box in the Timesheet ribbon"> <CommandUIExtension> <CommandUIDefinitions> ...


1

From your question, I understand that you want to add the button to the Page Tab in the Ribbon whenever a particular WebPart is added to the page. You can do this with the JavaScript Client Object Model: http://msdn.microsoft.com/en-us/library/hh185004 Here is a list of all Locations where the Button can be added: ...


1

Have you used the same value you used for the Type in the List template for the RegistrationId? You should be able to replace RegistrationId="101" with the List ID of your chosen custom document library. Something like RegistrationId="{$ListId:Lists/MyCustomLibrary;}"


1

Based on a tip here from Donal Conlon, I discovered that the IIS web site did not have Anonymous access enabled. I enabled Anonymous for the virtual root site, and now the ribbon delete is working. I am working through the other security implications of making this change, but it appears that claims is still authenticating correctly and I have proper access ...


1

One of those is what you want I think, if you view source on a normal publishing page you can see IDs like :- id="Ribbon.WikiPageTab" even though it isn't a wiki page... I am fairly sure that in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\GLOBAL\XML\CMDUI.XML you should be looking at:- <Tab ...



Only top voted, non community-wiki answers of a minimum length are eligible