In drupal 7, I want to render block into another block, for example block-1 into block-2. I guess I should put some PHP code into block-2, but I don't know what the code could be?
Based on Ashlars's comment.
A minipanel, provided by Panels, is for anyone not used to Panels, essentially a block, that supports internal layouts. You can use a mini-panel to wrap several different blocks (and many other things, views, nodes, etc) into a single "block".
Unfortunately, I must admit that documentation is scarce on this topic. I will refer you to this other question: looking for a good mini panels tutorial.
Completely agree with Letharion's comment but if there is absolute need for such, this code snippet can help:
<?php //D7 $block = module_invoke('module_name', 'block_view', 'block_delta'); print render($block['content']); ?>
If you are unsure what are exact parameters for 'module_name' and 'block_delta' I'd recommend searching the database table block and locating your specific
- module_name under column module
- block_delta under column delta
second parameter block_view remains exactly like that.