Hi, I tried to add a prefix to my bean-block of specific bundle-type.
I can rewrite the content of the bean - but I am not able to add a static prefix to all "bean-block-titles" of this specific type.

I tried a lot of different ways: here is my last:

function mymodule_preprocess_entity(&$variables) {
    if ($variables['entity_type'] == 'bean') {
        if ($variables['bean']->type == 'feeds') {
            $feeds_title = $variables['title'];
            $feeds_title = "<h2><span class='iconbg'> </span>$feeds_title</h2>";
//            dpm($variables);
            $variables['title'] = $feeds_title;
        }
    }
}

Comments

vistree’s picture

Hi,
I recognized, that I need to modify the block containing the bean in any way.
Do you have a suggestion how to do this on a bean-bundle-type base?

vistree’s picture

I found out, that I can override the bean-block-title general by using hook_block_view_alter.
But there I can only select block by module ( if($block->module == 'bean') { ) and not by bean-type. Is it possible to combine the preprocess_entity and the block_view_alter to modify the block title of beans by bean-type???