How to use code and written in .module file in menu_hook

 

The first step in creating the module is to create a folder for the module. You should put this in “sites/all/modules/{name of your module}.” Keep in mind that whenever I say “{name of your module},” you should insert the name of your module.

$items[‘select_sub_cat’] = array(
‘title’                        => ‘Ne treba’,
‘page callback’        => ‘slickguns_select_sub_cat_page’,
‘access callback’    => true, // ‘user_access’ (default), ‘node_access’
‘file’                            => ‘pages/select_sub_cat.inc’,
‘type’                        => MENU_CALLBACK,
);

return $ite

Was this article helpful?