Introduction
In this article, we will see how to implement PromotedActionsDelegate Control.
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.
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”.
Now our Solution Explorer looks as in the following,
Step 4:
Now open the “.ascx” of the User Control and paste the following code.
Step 5:
Add Elements.xml file to the Solution, provide the name and click on Add.
Step 6:
Click on elements.xml file and paste the following code snippet inside the elements tag,
- <?xmlversion="1.0"encoding="utf-8"?>
- <Elementsxmlns="http://schemas.microsoft.com/sharepoint/">
- <!-- DelegateControl reference to the PromotedActions Delegate Control -->
- <ControlControlSrc="/_controltemplates/15/PromotedActionsDelegate_Example/MyCustomPromotedActionsDelegate.ascx" Id="PromotedActions" Sequence="1" />
- </Elements>
- </Elements>
The final step is to build, deploy, and then add additional link.
The final outcome will look as follows,
No comments:
Post a Comment