Hide empty CCK fields from view

Some code to hide empty CCK fields upon display.


// hide empty fields from display
if (!$items[0]['view']) return;

Put this at top of field.tpl.php, which should be copied to your theme folder as per CCK theming documentation.

Tags:

Powered by Drupal, an open source content management system

About

Moshe WeitzmanMoshe Weitzman is a long time Drupal developer (since 2001). He manages groups.drupal.org and the Organic Groups module. His tiny company, Cyrve, specializes in data migration into Drupal. Read about his past projects (e.g. NY Observer) and contact him.

Moshe lives in Boston USA with his wife and 2 girls.

My Photos

Think!

Change Congress

Support CC - 2007

Support Obama 2008

Stop the Spying - EFF

Syndicate

Syndicate content