I've followed this post and made a custom module but when I try to access it from url domain.com/module/method I get 404?
Am I missing something?
I've followed this post and made a custom module but when I try to access it from url domain.com/module/method I get 404?
Am I missing something?
So much could be going wrong from a finger fudge standpoint here, so just make sure you have something very similar to this going on:
For example, in quick.info:
name = quick module
core = 6.x
description = quick module
package = quick package
In quick.module:
<?php
function quick_menu() {
$items = array();
$items['quick/hello'] = array( // change to the url you want
'title' => 'Quick Hello',
'type' => MENU_CALLBACK,
'page callback' => 'quick_hello',
'access arguments' => array('access content'),
);
return $items;
}
function quick_hello() {
$content='Hello. Thank you for surfing over to ' . $_GET['q'];
return $content;
}
Obviously make sure your module is enabled and not so obviously that all caches are cleared, but past that, the most important piece of the above is the 'quick/hello' when it comes to page found/not found :)