I've installed homebox module version 7.x-2.0-rc1. I've also custom module.
I've vocabulary like 'category' which contains terms like 'type1', 'type2'. Every terms contains title and image fields. When i created a new term, a new block is added to block list which displayed term title and term image.
Then I need a homebox page which displayed only all term blocks. Every time the term is created, new term block should be added into this homebox page and it should be configurable.
Is any suggestions? I've tried in various ways, but i can't make this work. Even i could created block while creating term items. But how to do remaining functions?
How implement hook_homebox() to list blocks programatically?
I've tried this code:
function phponwebsites_homebox() {
$pages = array();
$pages['samplebox'] = array(
'title' => 'Samplebox',
'path' => 'samplebox',
'menu' => 1,
'enabled' => 1, // Enable or disable the page. Only admins can view disabled
'regions' => 3, // How many regions to create (1-9)
'cache' => 0, // Use the block cache, when available
'full' => 0, // Disable theme regions so page can go full-width
'custom' => 0, // Allow users to add custom items to the page
'roles' => array(// Which roles can view the page. If none specified, no one can view
0 => 'authenticated user',
),
'color' => 1, // Allow users to change the color of blocks
'colors' => array(// Which colors are available (Must be 6 options)
0 => '#e4f0f8',
1 => '#c4d5b4',
2 => '#ecc189',
3 => '#ec8989',
4 => '#6b6b70',
5 => '#4b97e5',
),
'widths' => array(// (Optional) The width percentage of each region
1 => 25,
2 => 50,
3 => 25,
),
'blocks' => array(// The available blocks on the page
'block_9' => array(
'module' => 'block',
'delta' => 9,
'region' => 1,
'movable' => 1,
'status' => 1,
'open' => 1,
'closable' => 1,
'title' => 'test block for GT',
'weight' => -15,
),
'block_7' => array(
'module' => 'block',
'delta' => 7,
'region' => 2,
'movable' => 1,
'status' => 1,
'open' => 1,
'closable' => 1,
'title' => 'test block for HD',
'weight' => -15,
),
'block_8' => array(
'module' => 'block',
'delta' => 8,
'region' => 3,
'movable' => 1,
'status' => 1,
'open' => 1,
'closable' => 1,
'title' => 'test block for PD',
'weight' => -15,
),
),
);
return $pages;
}
But i couldn't make this work?