In this article we will see how to implement SuiteBarBranding Delegate Control in SharePoint 2013.
SuiteBarBrandingDelegate: This delegate care about top left site logo and text. Facilitates us to override the left-top corner text for the site. This text can only be replaced by Overriding SuiteBarBrandingDelegate Delegate Control with Custom Control Created using Visual Studio. Normally, there’s a text reading “SharePoint” .So we can replace it with the title of our own site:
Read some SharePoint 2013 tutorials below:
- Enable Sign in as Different User Option in SharePoint 2013
- Create subsite in SharePoint 2016 programmatically using server object model visual studio 2017
- Get manager of current SharePoint user using SPServices and GetUserProfileByName
SuiteBarBrandingDelegate Control will look as follows in SharePoint Page.
Create One Empty SharePoint Project and Provide the Solution Name and Choose the Solution Path and Click on OK.
Deploy the Solution as Farm Solution. Provide the Url in next Screen and validate the Connection.
Add New UserControl to the Project from the Templates and Provide the Name to it, In our case it is “MyCustomSuiteBarBrandingDelegate”
Now Our Solution Explorer looks as follows.
Now Open the “.ascx” of the User Control and paste the below code.
Code snippet for the ascx.cs file
Add Elements.xml file to the Solution, Provide the name and click on Add.
Click on elements.xml file paste the below code snippet inside the elements tag
<?xml version=”1.0″ encoding=”utf-8″?>
<!– Adding DelegateControl reference to our custom SuiteBarBrandingDelegate Control –>
<Control ControlSrc=”/_controltemplates/15/SuiteBarBrandingDelegate_Example\MyCustomSuiteBarBrandingDelegate.ascx” Id=”SuiteBarBrandingDelegate” Sequence=”1″ />
Final step is build and deploy then the SharePoint text will be over ride with the Text of the portal.
The final Outcome will be look as follows:
Hope this will be helpful.