Project:Block Theme
Version:6.x-1.0-beta1
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hi, I have the need to access the list of themes that are defined for blocktheme to integrate it with another module.

What I want is to be able to select which of the blockthemes to use when rendering a custom block. I am not declaring these blocks with hook_block so they can´t be configured with the admin interface.

I have found that the list of themes is generated in the hook_form_alter, which is impossible to reuse for another modules.

I have separated the part of creating the list of blockthemes into a separate function to be able to use it and I have a patch for this.

I hope this is commited as it´s very useful and does not affect the functionality.

thanks!!

AttachmentSize
blocktheme-getblockthemes_function.patch629 bytes

Comments

#1

Title:Getting a list of blockthemes » intended use

Hi, I forgot to post the way I intend to use it.

Whith this patch it is possible to get all defined blockthemes with

$blockthemes = module_invoke('blocktheme', 'get_blockthemes');

this variable can used to populate the options of a select list with Forms API like this

$selectlist = array(
  '#type' => 'select',
  '#options' => $blockthemes,
);

Hope this makes it more clear what my intentions are. As I said above, this does not affect functionality

#2

Title:intended use» Getting a list of blockthemes

#3

Assigned to:heronog» Anonymous
Status:needs review» fixed

Fixed in: http://drupal.org/cvs?commit=448216

#4

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nobody click here