Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
By aterchin on
made a simple thankyou page (e.g. /product/3/thankyou) based on a menu callback in a custom module. it renders out a page with some content after someone submits a review on a product. however, I want all my normal regions to show. any ideas?
// menu callback
function custom_menu() {
$items = array();
$items['product/%/thankyou'] = array(
'page callback' => 'custom_product_thankyou',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK
);
return $items;
}
// theme function
function custom_theme() {
return array(
'product_review_thankyou' => array(
'variables' => array('node' => NULL),
'template' => 'product_review_thankyou',
),
);
}
// page callback
function custom_product_thankyou() {
$node = node_load(arg(1));
$output = theme('product_review_thankyou', array('node' => $node));
return $output;
}
Comments
hook_menu return value
Your hook_menu in the code sample isn't returning $items
thanks for the response but
thanks for the response but unfortunately that's not the problem. i forgot to include $items in the code sample. updated it.
Menu links, answered my own question.
Block that wasn't showing up was a 'menu block' and the menu links weren't created for it so the block didn't show up. Wondering why this is default functionality for menu blocks to *require* links in order for the menu to be visible. Kind of dumb IMHO, unless there's something I'm missing.
http://stackoverflow.com/questions/8547655/show-all-regions-when-returni...