I currently am upgrading drupal from 6 to 7. I am having troubles upgrading the custom theme. Looking at the documentation I see that to render a page now i need to instead call:
print $page;
I need to call
print render($page);
Doing this however is not working for me. I have to dig into the array to make it render properly. Getting the main content to render I end up having to do this:
print render($page['content']['system_main']['main']);
However I am concerned that I'll be missing other stuff in the page array. Is there something that I am missing to get this page array constructed correctly?
Here is essentially an over view on how im constructing the page array:
products.module
products_menu(){
$items = array();
.....
$items['products/new'] = array(
'title' => 'Browse New Products',
'page callback' => 'products_browse_new',
'access arguments' => array('access content'),
'file' => 'products.new.inc',
'type' => MENU_NORMAL_ITEM,
);
}
...
function products_theme(){
...
'products_results_table' => array(
'template' => "products.results_table",
'variables' => array('products' => NULL),
'path' => $path,
),
...
}
products.new.inc