SmartDevicesPlus provide the possibility to implement a Dynamic Menu (with icons or not) in a simple way. Below is explained how to achieve this.
As a example, let´s select the template "Menu with banner".
The menu is loaded by a Data Provider which is called 'SDPMenuOptions' . In the Source section of it, there is a sample code that you can follow to load each item of the Menu.
Each Item has the following lines:
- Title: specifies the text that is shown in the item of the menu
- Icon: specifies the image that is shown next to the title
- ComponentToCall: specifies the component which will be called when the user select the item of the menu.
The syntax of the call is as follows: !"sd:<COMPONENT>?<PARAMETER>"
For more information of the way to call object go to the following link: Dynamic Calls
- Type: specifies the style of the item within the menu, as it may have a line as separator or not or can be shown as a link:
If you have selected a template that displays the User data, you should also load the SDPMenuInfoDP Data Provider as follows:
It's necessary to add in the event 'CompilationDummyEvent' of the SD Panel the call of the Objects that you have added in the menu.
At runtime will look as follows:
|