What you are doing so far is mostly correct (the "title" key is required for each element, so be sure to include it). Since page callback oriented to mymodule_landing() , the content returned by this function will display as your content on the page.
To make more pages (e.g. step2, step99, etc.), you continue to create additional paths in mymodule_menu() , for example:
$items['mymodule/step2'] = array( 'title' => 'Step 2', // Required 'page callback' => 'mymodule_step2', 'access arguments' => array('access content'), 'type' => MENU_NORMAL_ITEM, );
And so on ... You can use the same page mymodule_landing() and just pass the "page arguments" or each one can have its own page callback.
To place your mymodule_landing() function in a separate file, you can use the file and path file keys (see below)
$items['mymodule/landingpage'] = array( 'title' => 'Landing Page', // Required 'page callback' => 'mymodule_landing', 'access arguments' => array('access content'), 'type' => MENU_NORMAL_ITEM, 'file' => 'mymodule.pages.inc', 'file path' => drupal_get_path('module', 'mymodule'), );
You must put these files in your module directory (or a subdirectory inside the module directory and set the correct file path) and can access each page in mysite.com/mymodule/landingpage , mysite.com/mymodule/step2 , etc.
Recommendations for using the page handler (read more at http://drupal.org/node/146172 ):
Module developers can split page handlers into their modules, but they choose. However, the following recommendations and standards are recommended:
- Any module with more than 50 lines of code for page handler functions (including form processing functions, if applicable) should separate them into a separate file. This reduces the overhead for PHP when loading modules and, therefore, speeds up each individual request on the site.
- The page includes files that should be named in the form modulename.key.inc, where "modulename" is the name of the module and "key" is the one-word descriptive expression for the types of page handlers that it includes.
- For most modules, dividing page handlers into two files — example.admin.inc (for pages only for the administrator) and example.pages.inc (for pages available to users who are not administrators) —is a good practice. If the module does not have pages without an administrator, it should have only one example.admin.inc file. If the module does not have administrator-only pages, it should have only one example.pages.inc file.
- Modules that have a large number of page handlers can further separate page handlers. If this is the case, each file should be logically grouped by function (for example, admin pages related to the topic, admin pages related to logging, other admin pages and user accessible pages) and clearly marked. Remember that separating module page handlers is too difficult to maintain, and only one page handler includes a file that is ever loaded no matter how fine-grained handler functions are separated.
Added for reference only: hook_menu () documentation
page_example.module may also help you.