Hi,
I'm a newbie to drupal and read the module developers tutorial but it left me still a bit puzzled.
i need to integrate my webapp to drupal as a module. front-end usage is quite simple, i just need to show one page that queries data from the database and formats it according to a html template.
i'm know how to use hook_menu() to create the link to the page, but can really figure out what method should i use to show the data.
there shouldnt be any edit/submit pages. just the plain html page that is generated in the correct method. The method should also be able to get the logged user name from the framework so the module is able to query user specific data (how do i request the logged uid, or username, from drupal?)
function modulename_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array('path' => 'modulename/parameter', 'title' => t('view generated html'),
'access' => user_access('view datapage'));
return $items;
}
i understand that the modulename defines the module, and parameter defines the page somehow? how do i read that parameter? what hook is called to create the html in the middle column of the page shown in the browser?
this must be pretty simple, and most likely found easily in some tutorial, but i just dont seem to figure out where it is.
what is the minimum skeleton module for showing a link in the left menu to "datapage" page that you just can view (no add/edit form at all) and shows a bare page with text "datapage"?