Add Custom Link
| var navbar = AppGiniHelper.getCommon().getNavbar();
navbar.addLink("text", "href", "icon", position);
|
Parameters
| var navbar = AppGiniHelper.getCommon().getNavbar();
var dropdown = navbar.addDropdown("text", "icon", position);
dropdown.addLink("Text", "url", "icon");
dropdown.addLink("Text", "url", "icon", "target");
dropdown.addButton("Text", function() {
/* your function */
}, "icon");
|
Parameters
Add Divider
| dropdown.addDivider("text");
|
Change Icon after creation
If, on creation of a dropdown-menu, you have assigned the return value of addDropdown
to a variable, you can use that for changing icon/text later:
| // change menu text/icon later (after creation)
dropdown.set("icon", "Text");
|
Example
| var navbar = AppGiniHelper.getCommon().getNavbar();
var dropdown_current_user = navbar.addDropdown("...", "user", NavPosition.Right);
// lazy load current user and
// change text of user-dropdown menu
AppGiniHelper.getMemberID(function(memberID) {
dropdown_current_user.set("user", memberID);
});
|
See also