Skip to content

Allow hyperlinks in UnpBootNavigator and UnpBootHeader as menu choices #331

@RichSharpe

Description

@RichSharpe

Currently the menu options in these controls only open XPages in the currentDB.
The following change to the onclick event of the xp:link (line 68 in the UnpBootNavigator) allows a URL to be entered into the JSON string and activated by users.

if (child.ajaxloadid != null && child.ajaxloadid != ""){
return "unp.loadPage('" + getDbPath() + child.page + "?rnd=' + Date.now()+ ' #" + child.ajaxloadid + "', '" + child.ajaxtargetid + "', " + viewScope.menuitemindex + "); return false;";
}else if(child.page.indexOf("http://") > -1){
return "window.location.href='" + child.page + "'";
}else{
return "window.location.href='" + getDbPath() + child.page + "'";
}

This even allows Unplugged users to navigate to web pages if a connection exists.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions