My Bio content type has cck fields.
I want to show these fields in Panels panes.
Used a custom php code inserted in a pane similar to this:
<?php $mybionode = node_load(bio_for_user(arg(1))); ?> <?php if ($mybionode->field_birthday['value']): ?> <strong>Birthday: </strong> <?php print check_markup($mybionode->field_birthday['value']); ?> <?php endif; ?>
and it works fine.
Using the ['value'] variable is not an issue for most fields. But sometimes I will need the ['view'] variable, like in the case of that 'birthday' field, which is a date field. I'd like it was displayed according to the formatting I set when I created the field in cck.
I did a print_r to check the available variables, and in fact there's no ['view'] available for any field (not only date fields). But if I check the list of available variables using Content Template, the ['view']'s are all there, and the birthday field shows just like I wanted.
I used a similar technique before with other cck content types not associated with Bio, and the ['view'] was working.
Why are they not avilable now? Would this issue be related in some way to the
bio_for_user() function? Is there any other method to access bionode->field_anyfield['view']?