Skip to main content
replaced http://drupal.stackexchange.com/ with https://drupal.stackexchange.com/
Source Link

Easiest way to do this would be in a content-type template. You want to create a template for your content type, ex. node--[type|nodeid].tpl.php and add this in your theme folder. In your template, for displaying the boolean field you could use logic like this:

<?php 
if ($node->field_boolean_field[$node->language][0]['safe_value'] == 0) { 
    print "<img src='no_img.jpg'>";
} else {
    print "<img src='yes_img.jpg'>";
}
?>

This similar question may help as well:

Optionally add image/icon after node title based on boolean content type field?Optionally add image/icon after node title based on boolean content type field?

Easiest way to do this would be in a content-type template. You want to create a template for your content type, ex. node--[type|nodeid].tpl.php and add this in your theme folder. In your template, for displaying the boolean field you could use logic like this:

<?php 
if ($node->field_boolean_field[$node->language][0]['safe_value'] == 0) { 
    print "<img src='no_img.jpg'>";
} else {
    print "<img src='yes_img.jpg'>";
}
?>

This similar question may help as well:

Optionally add image/icon after node title based on boolean content type field?

Easiest way to do this would be in a content-type template. You want to create a template for your content type, ex. node--[type|nodeid].tpl.php and add this in your theme folder. In your template, for displaying the boolean field you could use logic like this:

<?php 
if ($node->field_boolean_field[$node->language][0]['safe_value'] == 0) { 
    print "<img src='no_img.jpg'>";
} else {
    print "<img src='yes_img.jpg'>";
}
?>

This similar question may help as well:

Optionally add image/icon after node title based on boolean content type field?

Source Link
schnippy
  • 5.3k
  • 18
  • 25

Easiest way to do this would be in a content-type template. You want to create a template for your content type, ex. node--[type|nodeid].tpl.php and add this in your theme folder. In your template, for displaying the boolean field you could use logic like this:

<?php 
if ($node->field_boolean_field[$node->language][0]['safe_value'] == 0) { 
    print "<img src='no_img.jpg'>";
} else {
    print "<img src='yes_img.jpg'>";
}
?>

This similar question may help as well:

Optionally add image/icon after node title based on boolean content type field?