I'll try to search and find some solution on my question but I'm confused.
If someone could help me at these first steps on drupal developement, just post some tips here.
I have write a custom module like.
My module name is photo_order
So I have a photo_order.info
name = Photo Order
description = Photo list to select customer order.
package = easyTECH
core = 7.x
files[] = photo_order.module
I have photo_order.module
function photo_order_menu() {
$items['photo_order/event/%'] = array(
'title' => 'Photos List',
'page callback' => 'photo_order_showlist',
'page arguments' => array(2), // The matched wildcard.
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
return $items;
}
With that hook just implement my menu and set the page callback function
Then I have try to write the callback that do a select on db and I wish to pass this data to the template to design a custom layout of photo list.
function photo_order_showlist($event = NULL) {
$query = db_select('node', 'n');
$query
->condition('type', 'node_gallery_item')
->fields('n', array('title'))
->range(0,100);
$result = $query->execute();
return theme('photo_order',array('output' => $result));
}