Custom page with fixed content Me again with the noob question.
I want to achieve this:
At the url http://ROOT/something/{numeric_id_here} to get a page that lists the header and the footer of the theme and my custom content. The content is not manage-able through the admin. It depends on the numeric id.
Here is what I got so far.
I use the hook_menu for this:

function something_menu() {
    $items['something/%id_here'] = array(
        'title' =&gt; 'Some title',
        'type' =&gt; MENU_NORMAL_ITEM,
    );
    return $items;
}


I have the function that parses the url and gets the numerical value:

function id_here_load($arg) {
    $data = get my custom data from an external xml feed based on $arg; //this works nicelly - I get an array with the data I need.
    //WHAT'S NEXT?
}


Now I'm stuck. how can I pass $data to a template and render that template in the content of the page?
My question is somehow similar to this one. Just that the answers provided there don't cut it for me.
You need more in your hook_menu() like this:

function something_menu() {
  $items = array();

  $items['something/%id_here'] = array(
    'title' =&gt; 'Some title',
    'type' =&gt; MENU_NORMAL_ITEM,
    // This is the function that will return your page content.
    'page callback' =&gt; 'something_custom_page',
    // This will pass the $data variable you returned from your loader function
    // into your page callback (not the ID in the URL).
    'page arguments' =&gt; array(1),
  );

  return $items;
}


Then your load function needs to actually return what it has loaded, like this:

function id_here_load($arg) {
  // Do some checks o make sure no one can pass in bad data via the url.
  // This is an example you need to check based on your data.
  if (is_numeric($arg)) {
    $data = get my custom data from an external xml feed based on $arg; //this works nicelly - I get an array with the data I need.
    // If you get back valid data.
    // Again you need to make this relevant to your data.
    if ($data) {
      // Return the data.
      return $data;
    }
  }
  // If for any reason you didn't end up getting data return FALSE.
  // This will cause access denied for this page because of an invalid ID or something.
  return FALSE;
}


Then you need to implement your page callback function like this:

function something_custom_page($data = array()) {
  // Do something with the $data to create the page and return
  // either a string of HTML or a drupal render array.
  // Returning a render array is the preferred option.
}


See Render Arrays in Drupal 7 form more info on render arrays.