0

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?

Path (URL) to call custom module function

1 Answer 1

0

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 :)

1
  • Thnx it was the caches.....
    – chchrist
    Commented Nov 29, 2011 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.