signalpoint / DrupalGap

An application development kit for Drupal websites.
https://www.drupalgap.org
GNU General Public License v2.0
232 stars 185 forks source link

Can't set menu links in region in hook_menu. #1029

Open liquidcms opened 5 years ago

liquidcms commented 5 years ago

According to documentation i should be able to assign menu links to regions in the hook_menu:

function qleva_menu() {
  var items = {};

  items['qleva_start'] = {
    title: 'Start',
    page_callback: 'qleva_start_page'
  };

  items['qleva_start_auth'] = {
    title: 'Home Auth2',
    page_callback: 'qleva_start_auth',
    pageshow: 'qleva_start_auth_show',
    //pagehide: 'qleva_start_auth_remove'
    //access_arguments: ['authenticated user'],
    region: {
      name: 'header',
      options: {
        attributes: {
          'data-icon': 'home',
          'class': 'ui-btn-left'
        }
      }
    }
  };

  return items;
}

this provides a page with correct title and correct content; but no icon shows in the header.

It does work when i add it in settings.js