views:

86

answers:

1

Subject for advanced views theming:

1) Create CCK integer field "field_checkbox" - Single on/of checkbox

Allowed values

0|No

1|Yes

2) In views row-style .tpl

<?php print $fields['field_checkbox_value']->content ?>

doesn't print any value, why?

Other fields output fine. Thank you in advance!

A: 

Resolved:

In views settings field output must be unformatted. Output of above function return 1.

Useful for advanced views theming, for example:

<h3 class="title <?php if ($fields['field_checkbox_value']->content) print 'another-class' ?>">
  <?php print $fields['title']->content ?>
</h3>
romandor