Printing out Node Variables nicely

You often have to print out node variables to see what you need to do. There are few ways to do that, before i used Drupal Themer for doing this which is part of Devel module. But this is very slow module and it takes a lot of time to load so i am not using it anymore. You can either use dpm function from devel module to dump something to screen nicely or just using plain old

How to print Description under the each Imagefield

So you put description for your images but there are nowhere to be seen? You or your client wants to have descriptions of images under each one. Well you will have to do some theming, in fact you have to create content-field.tpl.php and put it in your theme directory. And the code should be like this

Node loading, simple variable passing to flash banner

So in previous post with made drupal custom block now lets make custom block with flash banner where data to banner is passed from node that has CCK fields.Make content type with 4 cck text fields, or just use one field, even body can do and then you can manauly manipulate string with PHP, just have some separator in your input.

Anatomy of perfect landing page

Sometimes i will post just interesting things for web design in general. For example, this is good link with visual how your front page should look. Unfortionatly not much drupal themes look like this. I only know of this two

Remove new comments link in links section

Often you want to remove something from links section of nodes, best way is to intercept it in template.php and use UNSET on it, for example look here:


Use first image in imagefield gallery as teaser image or headline image

When you create imagefield gallery you can easily use first image to set it as teaser image if you use Views and Fields for row style but if you use NODE than you have a problem. Also with views you usually override or make lists of nodes but for full node display you need to use something else like Panels, or you can also try overriding nodes with views but that's not best practice.