I created a module, but none of the content that should appear in the module doesn't show up when I go to the page where the module is located. Does anyone know what the problem could be?

thank you

MT

Comments

Anonymous’s picture

Hi,

I'd like to help you, but I don't understand the problem. A module is not located on any particular page. Perhaps you mean a block?

Doug Gough
ImageX Media

scott.bell’s picture

Be sure to implement the hook_menu in your .module file and assign it the appropriate page callback.

Example:

function your_module_menu(){
	$items = array();
	
	$items['videos'] = array(
		'page callback' => 'display_videos_page',
		'file' => 'display_videos.pages.inc',
		'access arguments' => array('access content')
	);

This says that when the user is at http://www.yoursite.com/videos, it will execute the display_videos_page function located in the display_videos.pages.inc file. This function then tells drupal what to display.

PS: This is the Drupal 6 way.