Showing posts with label SharePoint Designer. Show all posts
Showing posts with label SharePoint Designer. Show all posts

Create custom ribbon button on SharePoint using designer

There are always some or the other action on your document library or list which you do repeatedly and many times a day. Clicking through various menu to do these becomes tiresome and you always wish if you had a button on your library robbon to reduce the effort.

Now you can add such a button on your ribbon with the help of SharePoint designer. Below is a step by step example where I created a notification button.

  1. Open you List or document library page and navigate to List/Library ribbon
  2. Look for "Customize Library" section on the right side of the ribbon and click on "New Quick Step"
  3. This will open SharePoint Designer with a pop up to set up property of the new button. You can choose to create a new workflow to implement the functionality of the button or can reuse already existing workflow.
  4. Note that you should know how to create workflow in SharePoint designer and should be able to translate your activity as workflow
  5. Once you have finalized the workflow click on "Publish".
  6. Open the library page again and choose one document. On the document ribbon under "Quick Steps" section, you should now be able to see the new button.


You can also associate the button to navigate to a form or webpage. For this you will have to:
  1. Navigate to the library on SharePoint Designer and look for the button in the "Custom actions" section in the botton right corner
  2. Click on the button name and choose the link where you want the button to redirect to.
  3. Save and publish the changes
  4. You can delete the button by choosing it and clicking on delete on the top ribbon



 

Using image button with Modal pop up on SharePoint page


Many times we need to add image buttons instead of normal submit button, to improve the styling of the page or to match up the styling of overall site.

Image button is ASP.NET control so adding it with Content editor webpart is not possible. You need use SharePoint designer for this. Given below are steps:

1.      Open the SharePoint page and choose to edit the page in SharePoint Designer


 


2.      In the Designer, click on the area where you want to add the button

3.      In the insert ribbon choose image button from ASP.NET section as shown below


4.      Drag and drop the image button where you want to place it

5.      Now you can set up various properties of this button by using the Tag Properties block on the right hand side.

6.      To open a new link on the click of the image button, you have to provide the value of new URL in “PostBackURL” property
7.      If you want to open a new window as modal pop up, you can provide the Javascript function in “OnClientClick” property. This property can also be used for client side validation etc.

8.      For modal pop up use the following code (change the target )

NewItem2(event,”http://www.targetsite.com/”); return false;