I put a navbar in the footer and placed some buttons. The display is good, but I cannot find a way to assign the link to a button like usual. The node/123 in the does not work.
/**
* Implements hook_block_info().
*/
function footer_intrfc_block_info() {
var blocks = {};
blocks['footer_intrfc_block'] = {
delta: 'footer_intrfc_block',
module: 'footer_intrfc'
};
return blocks;
}
/**
* Implements hook_block_view().
*/
function footer_intrfc_block_view(delta, region) {
//var content = {};
var content = '<div data-role="navbar">';
content += '<ul>';
content += '<li><a href="" data-icon="home">Home</a></li>';
content += '<li><a href="node/1029" data-icon="action">Saved</a></li>';
content += '<li><a href="node/969" data-icon="star">Sponsors</a></li>';
content += '<li><a href="node/1021" data-icon="gear">Setup</a></li>';
content += '</ul></div>';
if (delta == 'footer_intrfc_block') {
content['my_out'] = {
markup: ''
};
}
return content;
}
The link of node will show "Error Loading Page". I wonder where I can set my link by path: 'node/123'
like in setting.js
I also tried:
content += '<li><a onclick="javascript:drupalgap_goto("node/1029");" data-icon="action">Saved</a></li>';
and
content += '<li><a href="javascript:drupalgap_goto("node/1029");" data-icon="action">Saved</a></li>';
but they do not work.