[support] Error with my first module

Marolijo marolijo at yahoo.es
Tue May 31 08:33:45 UTC 2011


The primary links on my site dissapear, and the block isn't displayed
(I assignad it to a section under blocks section)
I google'd without luck.

thank's for your time








2011/5/30 William Smith <william.darren at gmail.com>:
> When you say that it breaks your primary links, how do you mean?
>
> On Mon, May 30, 2011 at 6:08 AM, Marolijo <marolijo at yahoo.es> wrote:
>>
>> Hello, I'm tryin' to setup my first module. Created the .info and
>> .module files on sites/all/modules/modulename, and start with a very
>> basic block but when I enable th emodule it breaks my primary links
>> menu (superfish menu).
>>
>> Here's the simple code on .module , any idea?
>>
>> Wich is the simplest way to debug this kind of problems?
>>
>> Thank's for your time an patience.
>>
>> <?php
>> function modulename_block($op='list',$delta=array(),$edit=array())
>> {
>>      switch ($op)
>>     {
>>
>>        case 'list':
>>                       $blocks[0]['info'] = t('module test');
>>                       return $blocks;
>>                       break;
>>         case 'view':
>>
>>
>>          $content = 'hello world';
>>          $blocks['subject'] = t('module test');
>>          $blocks['content'] = "Test";
>>       return $blocks;
>>       break;
>>      }
>> }
>> --
>> [ Drupal support list | http://lists.drupal.org/ ]
>
>
> --
> [ Drupal support list | http://lists.drupal.org/ ]
>


More information about the support mailing list