[development] How to disable any block or sidebar from module

Earnie Boyd earnie at users.sourceforge.net
Fri Jul 17 18:01:45 UTC 2009


Quoting "Tomá? Fülöpp (vacilando.org)" <tomi at vacilando.org>:

> Hi,
>
> I cannot find a generic way how to disable a sidebar programmatically.
>
> In my module, if some conditions are met, I would like to make sure that the
> whole sidebar (or any blocks in it) are not rendered at all, regardless of
> the theme.
>
> Could somebody advise, please? Sorry if it's obvious..
>

I think you want to use hook_block()[1].

[1] http://api.drupal.org/api/function/hook_block


--
Earnie
-- http://r-feed.com/           -- http://for-my-kids.com/
-- http://www.4offer.biz/       -- http://give-me-an-offer.com/



More information about the development mailing list