I'm working my way through the drupal 6.x module developers guide. In http://drupal.org/node/206761 , the text talks about something called hook_menu(), but the example shows onthisdate_menu()? I don't understand the relationship between these two.
I created the onthisdate_menu() function as described, but when I go to the admin page, I don't see anyplace to configure the module.
---------------- Roy Smith roy@panix.com
When you are using a hook function, you replace the word "hook" with the name of your module. So, if your module is called mymodule, then the menu function would be mymodule_hook().
Steve
Roy Smith wrote:
I'm working my way through the drupal 6.x module developers guide. In http://drupal.org/node/206761 , the text talks about something called hook_menu(), but the example shows onthisdate_menu()? I don't understand the relationship between these two.
I created the onthisdate_menu() function as described, but when I go to the admin page, I don't see anyplace to configure the module.
Roy Smith roy@panix.com
OK, that makes sense, but I don't think the tutorial says that. It would be useful if the text was updated to include that note. It would have saved me a bunch of head scratching.
On Aug 18, 2008, at 10:40 PM, Steve Edwards wrote:
When you are using a hook function, you replace the word "hook" with the name of your module. So, if your module is called mymodule, then the menu function would be mymodule_hook().
Steve
Roy Smith wrote:
I'm working my way through the drupal 6.x module developers guide. In http://drupal.org/node/206761 , the text talks about something called hook_menu(), but the example shows onthisdate_menu()? I don't understand the relationship between these two.
I created the onthisdate_menu() function as described, but when I go to the admin page, I don't see anyplace to configure the module.
Roy Smith roy@panix.com
-- [ Drupal support list | http://lists.drupal.org/ ]
---------------- Roy Smith roy@panix.com
This is how all hooks work, so it won't appear on each page. Refer to the hooks overview to understand the overall system.
Welcome to Drupal :)
On Tue, Aug 19, 2008 at 1:54 PM, Roy Smith roy@panix.com wrote:
OK, that makes sense, but I don't think the tutorial says that. It would be useful if the text was updated to include that note. It would have saved me a bunch of head scratching.
It would be useful if, at the first place a hook function is mentioned in the tutorial, there was a link to someplace that described the naming scheme. If the reader is not familiar with the overall architecture (for an introductory tutorial like this, it's likely they're not), this is a stumbling point.
On Aug 19, 2008, at 8:00 AM, Fred Jones wrote:
This is how all hooks work, so it won't appear on each page. Refer to the hooks overview to understand the overall system.
Welcome to Drupal :)
On Tue, Aug 19, 2008 at 1:54 PM, Roy Smith roy@panix.com wrote:
OK, that makes sense, but I don't think the tutorial says that. It would be useful if the text was updated to include that note. It would have saved me a bunch of head scratching.
-- [ Drupal support list | http://lists.drupal.org/ ]
---------------- Roy Smith roy@panix.com
Quoting Roy Smith roy@panix.com:
It would be useful if, at the first place a hook function is mentioned in the tutorial, there was a link to someplace that described the naming scheme. If the reader is not familiar with the overall architecture (for an introductory tutorial like this, it's likely they're not), this is a stumbling point.
Links to http://api.drupal.org/api/group/hooks/6 and http://api.drupal.org/api/function/hook_menu/6 have been added.
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
Quoting Roy Smith roy@panix.com:
OK, that makes sense, but I don't think the tutorial says that. It would be useful if the text was updated to include that note. It would have saved me a bunch of head scratching.
Would a reference to http://api.drupal.org/api/group/hooks help?
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
Yes, that would be good.
On Aug 19, 2008, at 11:25 AM, Earnie Boyd wrote:
Quoting Roy Smith roy@panix.com:
OK, that makes sense, but I don't think the tutorial says that. It would be useful if the text was updated to include that note. It would have saved me a bunch of head scratching.
Would a reference to http://api.drupal.org/api/group/hooks help?
Earnie -- http://for-my-kids.com/ -- http://give-me-an-offer.com/
-- [ Drupal support list | http://lists.drupal.org/ ]
---------------- Roy Smith roy@panix.com