1 theming_example.module | theming_example_page() |
Initial landing page explaining the use of the module.
We create a render array and specify the theme to be used through the use of #theme_wrappers. With all output, we aim to leave the content as a render array just as long as possible, so that other modules (or the theme) can alter it.
See also
Related topics
File
- modules/
examples/ theming_example/ theming_example.module, line 141 - Hook implementations for the Theming Example module.
Code
function theming_example_page() {
$content = array();
$content[] = array('#markup' => t('Some examples of pages and forms that are run through theme functions.'));
$content[] = array('#markup' => l(t('Simple page with a list'), 'examples/theming_example/theming_example_list_page'));
$content[] = array('#markup' => l(t('Simple form 1'), 'examples/theming_example/theming_example_select_form'));
$content[] = array('#markup' => l(t('Simple form 2'), 'examples/theming_example/theming_example_text_form'));
$content['#theme_wrappers'] = array('theming_example_content_array');
return $content;
}