Same name and namespace in other branches
  1. 7.x-1.x page_example/page_example.module \page_example
  2. 8.x-1.x page_example/page_example.module \page_example

Create a page in a module. (Drupal 6)

This example demonstrates how a module can be used to display a custom page at a given URL.

This example is part of the Examples for Developers Project which you can download and experiment with here: http://drupal.org/project/examples

Parent topics

File

page_example/page_example.module, line 9
This is an example outlining how a module can be used to display a custom page at a given URL.

Functions

Namesort descending Location Description
page_example_arguments page_example/page_example.module A more complex page callback that takes arguments.
page_example_custom_access_callback page_example/page_example.module If your custom access callback function checks for permissions, it should still use user_access. You may add whatever additional logic you like, though.
page_example_custom_access_page page_example/page_example.module Page callback to demonstrate a custom access callback.
page_example_description page_example/page_example.module None of these page examples makes use of the Form API. The Form Example provides examples that do.
page_example_help page_example/page_example.module Implementation of hook_help().
page_example_menu page_example/page_example.module Implementation of hook_menu().
page_example_other_permissions page_example/page_example.module Page callback to demonstrate checking for the 'access content' permission.
page_example_perm page_example/page_example.module Implementation of hook_perm().
page_example_simple page_example/page_example.module A simple page callback.