Last updated 23 November 2013. Created on 30 September 2008.
Edited by areke, darol100, Melissamcewen, verta. Log in to edit this page.

How to use Nodeblock:

  1. Install the Nodeblock module the usual way at admin/build/modules.
  2. Edit the content type that you wish to use as a block. In most situations you would create a simple content type named Block to use as your custom blocks, but you shouldn't feel limited to just this usage. Any type of node, using any type of field may be used as a nodeblock.
  3. Select the Enabled radio button on the Available as block field.
  4. Create block nodes and watch them populate your block list!

Using settings to change display for specific blocks on their block configuration pages:

  1. You can get rid of node links like comment, edit, etc. by unchecking that box under "Block specific settings"
  2. You can remove the title by placing <none> in the title box

Using settings to change display for all blocks of a certain node type :

  1. To remove post information, the "submitted by" field, uncheck the box for that node type under "display post information on:" at admin/build/themes/settings

How to theme your node blocks:

Copy the node-nodeblock-default.tpl.php file from the nodeblock module folder to your theme folder, rename it to node-nodeblock.tpl.php (replacing 'nodeblock' with the name of your content type which you use for blocks) and start theming it as usual.

Looking for support? Visit the forums, or join #drupal-support in IRC.


chichilatte’s picture

I'm wondering how to theme individual nodeblock blocks using file templates. It seems you can only have one one template file per content type, e.g. if my content type is called 'generic_content', here are the candidate template files (according to Devel Themer)...

node-generic_content.tpl.php < node-nodeblock-default.tpl.php < node.tpl.php

There's nothing like "node-generic_content-block-1.tpl.php" (i'm not sure what the exact filename construction would be).

The 'generic content' content type seems to be a good way of placing easily editable blocks which have multiple custom textfields (without creating tons of new content types), but unless you can theme them easily it's useless.

blw0010’s picture

I tried doing what was said in Drupal 7 and it doesn't work. I tried with and without the double dash (node--custom_content_type.tpl.php and node-custom_content_type.tpl.php).

Anyone know why?

terry22’s picture

I can't get the template to work under drupal 7.
Did you found a way to do it?

jeremyr’s picture

It's possible you need to also include the default node.tpl.php in the theme folder.

T: @jprasmussen
W:’s picture

Yes, seems to work. Use 2 dashes node--mycustomthingy.tpl.php... details details. Great! thx