I have several modules that make extensive use of the Ctools Automodal modal to activate custom-driven modals. These Link references live in their own module, example_item_modals
:
/**
* Implements hook_menu()
*/
function example_item_modals_menu() {
$items['product/product1'] = array(
'page callback' => 'product_order_modal_1',
"access arguments" => array('interact with orders'),
'type' => MENU_LOCAL_TASK,
'modal' => TRUE
);
$items['product/product2'] = array(
'page callback' => 'product_order_modal_2',
"access arguments" => array('interact with orders'),
'type' => MENU_LOCAL_TASK,
'modal' => TRUE
);
return $items;
}
We have another module that loads in a User Profile (developed by another third party) and the requirements call for loading some of the products here, and interacting with the modal. Actually displaying the links are done using a tpl.php call to those menu calls with an l()
.
<ul>
<li>
<?php echo l("View Product", "product/product1"); ?>
</li>
</ul>
So when we eventually load the template call in this custom user profile module, this link should load and have the necessary logic to fire the modals. Except, its not. Here, it treats it like a backpage link. Is there something I am missing for this link to function as a modal? Do I need to explicitly include the parent module the links are defined with, and if so, what API call accomplishes that? (I looked at module_load_include()
but i'm importing settings thrown in the .module, not a .inc file).