How to: Add an Item to the Menu Bar of the Home Page
Applies To: Windows Server 2012 Essentials, Windows Home Server 2011, Windows Storage Server 2008 R2 Essentials, Windows Small Business Server 2011 Essentials
An add-in can add an item to the menu bar at the top of the home page. The item that the add-in defines in the menu bar is typically associated to a content page. The item can point to the Default.aspx page, or it can point to a custom .aspx page. The item is added to the menu bar by adding a Desktop element to the webaddin.xml file.
The following table lists the child elements of the Desktop element.
Element | Description |
---|---|
DefaultSrc | The name of the .aspx file to be used for the item. |
BrowserTitle | The title to be used in the browser window. |
NavigationText | The text to be used for the item. |
HeaderText | The header text for the item. |
To create a new item in the menu bar
Open Visual Studio 2010 as an administrator by right-clicking the program in the Start menu and selecting Run as administrator.
If you have not already created a new project, complete the procedure listed in How to: Create a New Project For Your Remote Web Access Add-In.
Open the webaddin.xml file.
Add a new Desktop element to the webaddin.xml file. The Desktop element is a child element of WebAddins. For example, the following xml code adds an item to the menu bar:
<Desktop> <DefaultSrc>Default.aspx</DefaultSrc> <BrowserTitle>Sample Addin</BrowserTitle> <NavigationText>Sample</NavigationText> <HeaderText>Sample Desktop</HeaderText> </Desktop>
Save the webaddin.xml file.
Publish the application.