Timeline for Add block programmatically in the right region
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 13, 2017 at 12:47 | history | edited | CommunityBot |
replaced http://drupal.stackexchange.com/ with https://drupal.stackexchange.com/
|
|
May 6, 2015 at 19:32 | vote | accept | Guillaume Bois | ||
May 6, 2015 at 19:23 | comment | added | Geoff | are you sure the machine name for the region is correct? | |
May 6, 2015 at 17:48 | answer | added | 2pha | timeline score: 3 | |
May 6, 2015 at 17:29 | comment | added | Guillaume Bois |
@Clive About "regions", when the hook_block_info() is executed, it will add a block for each enabled theme. But in my case all of them are set to the "none" region...
|
|
May 6, 2015 at 17:08 | comment | added | Guillaume Bois | Oops, typo I corrected the events.module in my post here. In my code it was already ok. | |
May 6, 2015 at 16:34 | history | edited | avpaderno♦ |
edited tags
|
|
May 6, 2015 at 16:09 | history | edited | Guillaume Bois | CC BY-SA 3.0 |
added 1 character in body
|
May 6, 2015 at 15:48 | comment | added | Clive♦ |
You have a pluralisation bug (module is called event , but you're implementing hooks for a module called events ). Other than that your method is correct, there's no way to provide blocks through an install file (it's not how Drupal's architecture works yet, in Drupal 8 you don't use the block hooks). region is per-theme by the way, and has some extra constraints, the variable desc in the function docs themselves should let you know if those apply to you
|
|
May 6, 2015 at 15:45 | history | asked | Guillaume Bois | CC BY-SA 3.0 |