Same name and namespace in other branches
  1. 4.7.x developer/examples/page_example.module \page_example_foo()
  2. 5.x developer/examples/page_example.module \page_example_foo()

A simple page callback.

Page callbacks are required to print the entire page. This is usually accomplished via a call to theme('page'), passing the page content as a parameter. The theme system will then surround the content in the appropriate blocks, navigation, and styling.

1 string reference to 'page_example_foo'
page_example_menu in developer/examples/page_example.module
Implementation of hook_menu().

File

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

Code

function page_example_foo() {
  $content = '<p>The quick brown fox jumps over the lazy dog.</p>';
  print theme('page', $content);
}