London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
The Toolbar is a set of buttons, menus, and text with structure and action commands defined in XML. The following top menu examples shows how to modify toolbar items.
Add a new item to the Welcome menu on top of the page by creating the TopMenu.xml file in the ~/Apps/(ModuleName)/Config/View folder.
<?xml version="1.0" encoding="utf-8" ?>
<View xmlns="http://schemas.mediachase.com/ecf/view">
<ListViewUI>
<Toolbar>
<Menu id="CreateMenu" text="\{SharedStrings:Welcome\}">
<add>
<Button id="MyTestButton" text="TestButton" imageUrl="~/Apps/Shell/styles/Images/Shell/exit.gif" commandName="TestCommand"></Button>
</add>
</Menu>
</Toolbar>
<Commands>
<add>
<Command id=" TestCommand">
<CommandType>ClientAction</CommandType>
<ClientScript>alert('test command');ClientScript>
</Command>
</add>
</ListViewUI>
</View>
The following example shows how to change the Sign Out text in the same menu.
<?xml version="1.0" encoding="utf-8" ?>
<View xmlns="http://schemas.mediachase.com/ecf/view">
<ListViewUI>
<Toolbar>
<Menu id="CreateMenu" text="{SharedStrings:Welcome}">
<Button id="SignOutBtn" text="{ShellStrings:Sign_Out}" imageUrl="~/Apps/Shell/styles/Images/Shell/exit.gif" commandName="ECF_Top_SignOut">
<setAttributes text="New SignOut Text"></setAttributes>
</Button>
</Menu>
</Toolbar>
</ListViewUI>
</View>
The following example shows how to remove the Sign Out button from the menu.
<?xml version="1.0" encoding="utf-8" ?>
<View xmlns="http://schemas.mediachase.com/ecf/view">
<ListViewUI>
<Toolbar>
<Menu id="CreateMenu" text="{SharedStrings:Welcome}">
<remove nodeId="SignOutBtn" /
</Menu>
</Toolbar>
</ListViewUI>
</View>
You can add the following elements to the toolbar:
Note: If the XML contains an unsupported element, the NotSupportedException exception is thrown.
Last updated: Oct 12, 2015