Splitting up the .module file
質問
I wrote my first module which happens to be in Drupal 7. The module uses hook_menu to correlate URLs with three custom-coded, page call backs. These callback functions that construct the custom html are currently inside the .module file.
The file is getting a little long and I would like to put the three custom-coded page call backs into another file. My first attempt did not work this morning, I'm not sure what I did wrong...
1) Added this line to the .info file:
files[] = my_module.pages.inc
2) Placed the callbacks into my_module.pages.inc
What is wrong or missing in this approach?
正しい解決策はありません
所属していません drupal.stackexchange