Skip to content

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

@liquidcms

Description

@liquidcms

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions