1

I have a template file in which I would like to restructure the output of a block item (the applicable block changes depending on the page you are on). Basically what I want to accomplish is to list the items that will be rendered in a region, pick out the one I want and then modify how it will be displayed. What would be the best way to accomplish this? Can I do this through the template file?

Thanks.

1
  • Do you want to theme a specific block or do you want to change the way the blocks are put together? See https://drupal.org/node/104319 for the documentation on how to name a template file for a specific block.
    – Thomas4019
    Dec 2, 2013 at 20:37

1 Answer 1

0

The solution I went with is to use the template_preprocess_block() hook as it allows me to render the items as I see fit. The issue with using the block.tpl.php file is that it does not give you access to components that is used to render the block (as by this point in the process, it is already rendered).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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