0

My block is not showing in the blocks menu for some reason and im sure everything is correct on it, am I missing something on it?

.info file

; $Id: loans_zillow.info,v 1.0.0.0 2011/02/09 10:11:15 Jeremy Exp $
name = "Custom Zllow Module"
version = "1.0 Beta"
description = "A custom module from zillow's api"
core = "7.x"
package = "Custom Modules"

.module file

   function zillow_block_info(){
        $blocks['zillow_block'] = array(
            'info' => t('Zillow Block'),
        );
        return $blocks;
    }

    function zillow_block_view($delta = ''){
        $block = array();
        switch ($delta){
            case 'zillow_block';
            $block['subject'] = t('Zillow Block');
            $block['content'] = zillow_content();
            break;
        }
        return $block;
    }

    function zillow_content(){
        return'
            <div>this is a test</div>
        ';
    }

1 Answer 1

1

Your code works fine for me so I'd check the following:

  • Make sure the module's installed and enabled.
  • Make sure the module is definitely named zillow (the module file should be called zillow.module, info file zillow.info, etc).
  • Make sure you've cleared Drupal's caches.

I realise these might be obvious solutions but as I say the code works for me so I can only guess your hooks are not being called for one of the reasons above.

1
  • There was a l instead of a i in zillow on my file name thats what messed it up. Thanks though Mar 8, 2012 at 0:35

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.