Book Image

SharePoint 2013 WCM Advanced Cookbook

By : JOHN CHAPMAN
Book Image

SharePoint 2013 WCM Advanced Cookbook

By: JOHN CHAPMAN

Overview of this book

Table of Contents (19 chapters)
SharePoint 2013 WCM Advanced Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adding promoted action links with the PromotedActions delegate control


The out-of-the-box master pages included with SharePoint contain a series of promoted actions on the top-right corner of the page. These JavaScript-based actions are displayed as links and include functions such as FOLLOW and SHARE as shown in the following screenshot. The PromotedActions delegate control allows us to add additional actions, but does not replace the existing actions.

In this recipe, we will add a custom promoted action that fires a JavaScript alert. Promoted actions could be used for a variety of purposes related to the page or site the user is currently viewing. For instance, a promoted action could be created to post a link to the page on social network sites.

Getting ready

We should have already created our Visual Studio project in the Creating a Visual Studio solution for custom delegate controls recipe of this chapter before starting this recipe.

How to do it...

Follow these steps to add a promoted action...