In this task, you will add a
custom action to the ribbon of all Document Libraries to launch the App.
- In Visual Studio, right click the HelloApp node and select AddØNew Item from the Context menu.
- In the New Item dialog, select Ribbon Custom Action.
- Name the item Launcher and click Add.
- In the Create Custom Action
for Ribbon window, choose to expose the custom action to the Host Web.
The Custom Action should be scoped to List Template, and the particular item the custom action is scoped
to is Document Library.
- In the next window, we will specify settings to generate a button control for the ribbon. Use the following settings:
- Where is the control located? Ribbon.Documents.Manage.Controls._children
- What is the label text for the button control? Go!
- Where does the button control navigate to? HelloApp\Pages\Default.aspx
Launch an App from the Ribbon:
In this task, you will deploy
the App and use the button on the Ribbon to launch it.
- In Visual Studio, right click the HelloApp node and select Deploy from the Context menu.
- After the App is deployed, open the home page of the portal where the App is hosted (not the App itself!).
- On the home page, click Site Contents.
- Click Add an App.
- Select to Add a Document Library.
- Name the Document Library Shared Documents.
- On the Apps page, click the
newly-created Shared Documents
library.
- In the ribbon, click the Files tab.
- Launch the App using the button you created.
Launching the App from the Ribbon
No comments:
Post a Comment