Hi there,

I have a content type without a body field, which I replaced for another some time ago.
Is there any way I could make it work to inject the block in another field?

Thanks a lot

Comments

algazaras created an issue.

algazaras’s picture

Hi again,

Could someone please help me? I'd like to use this module to insert a block in a field, which is not the body field. Is this possible?

Thanks a lot

pmichelazzo’s picture

Unfortunately yes, but if you make a patch, you can change for any multi-text field.

Change the line 168 from this
$node->content['body'][0]['#markup'] = $render;

to this
$node->content['your_field_name'][0]['#markup'] = $render;

and change the line 869 from this

$body = field_get_items('node', $node, 'body');

To this
$body = field_get_items('node', $node, 'your_field_name');

Best!