[support] Inserting text in a block

Mutuku Ndeti jnmutuku at gmail.com
Wed Oct 5 05:38:07 UTC 2011


I had checkout out. I am wondering how to add text e.g "welcome to  my
website" using hook_block_view_MODULE_DELTA_alter.  I have tried an
example below. print_r works fine.

function hook_block_view_MODULE_DELTA_alter(&$data, $block) {
  //print_r($data);
  $data['subject'] = t('New title of the block');
}

On 05/10/2011, Steve Karsch <steve at stevekarsch.com> wrote:
> Into an existing block?  Such as a block provided by another module?
> Check out hook_block_view_alter()
>
> http://api.drupal.org/api/drupal/modules--block--block.api.php/function/hook_block_view_alter/7
>
> On Tue, Oct 4, 2011 at 7:07 PM, Mutuku Ndeti <jnmutuku at gmail.com> wrote:
>> I forgot to say I am using drupal 7
>>
>> On 05/10/2011, Mutuku Ndeti <jnmutuku at gmail.com> wrote:
>>> Hi,
>>>
>>> I want to  insert custom text in a block. How do I do this
>>> problematically?
>>> --
>>> Tel:254- 722-490994
>>> www.agile.co.ke | www.jipambe.com
>>>
>>
>>
>> --
>> Tel:254- 722-490994
>> www.agile.co.ke | www.jipambe.com
>> --
>> [ Drupal support list | http://lists.drupal.org/ ]
>>
> --
> [ Drupal support list | http://lists.drupal.org/ ]


-- 
Tel:254- 722-490994
www.agile.co.ke | www.jipambe.com


More information about the support mailing list