Hi,

I have created a custom module that creates custom nodes and blocks. The nodes are displayed inside the blocks. My question is how do I remove all of the unwanted markup added by drupal??

When node_view() is called from my hook_block view op, the node is returned wrapped in <div class="content"></div>. Also, additional markup is added at the block stage such as: <div id="node-25" class="node sticky clear-block">.

As I created a theme function for my node type, I thought all of this would have been removed, I haven't created a theme function for the block yet, I just want to know where I'm going wrong before I do this.

Thanks.

Comments

petersim’s picture

The extra markup gets added to the block at the theme level by the block.tpl.php file and node.tpl.php file. You will need to override these files with a custom tpl.php file to work with your module.

jonshot’s picture

I should have guessed that! Thanks for the help.