Define block delta from a renderable array via hook_page_alter
I am working at theme layer via hook_page_alter to insert a custom "special_theme" into the footer region without using block management, nor module:
$page['footer'][] = array(
'#weight' => 10,
'#theme' => 'special_theme',
'#theme_wrappers' => array('block'),
'#region' => 'footer',
);
The template is defined at hook_theme. The block is inserted into the footer region as I expected, but I need to define its block id or delta. Drupal automatically inserted id="block--2". I need to change "--2" into more readabl开发者_如何学Goe delta, such as "special_delta".
Is it possible with current drupal 7, and how? I may miss something obvious. Thanks for any help.
This is not possible with current drupal 7, I guess. Hopefully future drupal can define blocks via template layer. The hook_page_alter is already powerful. How can I close this question?
精彩评论