Implement Custom Promoted ActionsDelegate Control In SharePoint 2013

Posted: December 25, 2015 in SharePoint2013

Introduction

In this article you will learn how to implement Custom Promoted ActionsDelegate Control in SharePoint 2013.

PromotedActions:

Delegate Control is responsible for displaying Links “Share, Follow, SYNC, EDIT” in top right below SuiteLinksDelegate Control. These links can be replaced by Overriding PromotedActions Delegate Control using a Custom Control created using Visual Studio to the following area on a SharePoint site in the top-right section of the page.

newsfeed

Step 1:

Create one Empty SharePoint Project and provide the Solution Name and choose the Solution Path and click on OK.

Step 2:

Deploy the Solution as Farm Solution. Provide the Url in next screen and validate the Connection.

Step 3:

Add New UserControl to the Project from the Templates and provide the Name to it, in our case it is “MyCustomPromotedActionsDelegate”.

MyCustomPromotedActionsDelegate

Now our Solution Explorer looks as in the following,

Solution

Step 4:

Now open the “.ascx” of the User Control and paste the following code.

ascx

Step 5:

Add Elements.xml file to the Solution, provide the name and click on Add.

Elements

Step 6:

Click on elements.xml file and paste the following code snippet inside the elements tag,

  1. <?xmlversion=“1.0”encoding=“utf-8”?>
  2.     <Elementsxmlns=http://schemas.microsoft.com/sharepoint/&#8221;>
  3.         <!– DelegateControl reference to the PromotedActions Delegate Control –>
  4.         <ControlControlSrc=“/_controltemplates/15/PromotedActionsDelegate_Example/MyCustomPromotedActionsDelegate.ascx” Id=“PromotedActions” Sequence=“1” />
  5.         </Elements>
  6.   </Elements>

Step 7:

Final step is to build, deploy and then ad additional link.

The final outcome will look as follows,

Outcome

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s