2

I need to embed each node I have in a different block. How can I achieve it?

If it makes any difference, I am using Drupal 7.

  • Do you want to have every block in blocks page of admin area? – Codium Feb 23 '12 at 13:27
5

create a block and use the below code to get the node body field content.

$node = node_load(YOUR_NODE_ID);
$body_content = $node->body[$node->language][0]['value'];
print $body_content;

If you are using a field other than body field, then you should print_r that $node variable and you will get all content type field relate with particular node.From this array you can get the all values created by content types.

2

Sounds like Nodes In Block is exactly what you're after. Node Blocks might also help is the first one doesn't.

  • A vote for Node Block in particular. Using it for the original poster's use case and it does it perfectly. Can override the title from the node, contextual edit links work, choose the view mode overall or per node, all great. – mlncn Jun 23 '14 at 12:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.