0
votes

I'm not really sure what direction to go in. I have a box on multiple pages that displays the status of various items. I want it easily update-able and would prefer it to be updated via a module. I'm not sure what direction to go in and just need a gentle push.

I have created a table in the drupal sql db but not sure how I would go about creating an admin tool in the drupal control panel to make changes to it.

Does anyone have any ideas of how I should go about this? p.s. I'm using drupal 7

1
You would want to create a module that uses hook_menu() to add a new menu item to the drupal admin section. In your new menu item you define a page callback which is a function that will render your admin page. - PiX06

1 Answers

1
votes

Custom admin pages can be defined as follows:

  function mymodule_menu() {
    $items['admin/def'] = array(
      'page callback' => 'mymodule_abc_view',
      'page arguments' => array(1, 'foo'),
      'access arguments' => array('administer nodes'),
      'title' => 'Foo settings',
      'type' => MENU_NORMAL_ITEM,
    );
    return $items;
  }

Where mymodule is the name of your module and mymodule_abc_view is the function that returns the markup for your admin page