Hi,
Just a little question... how to call a field in my php template?
With flexinode I did print $node->flexinode_7 for instance, but what is the correct syntax for cck?

Thanks

Comments

jonbob’s picture

You should be able to use

print $node->field_myfieldname['view']

in this case. No more remembering which field is which number!

I highly recommend installing devel.module when doing development with 4.7. It adds an "object structure" tab when viewing a node that allows you to see all of the pieces of information you can display in your theme.

jonbob’s picture

Status: Active » Fixed
Julien PHAM’s picture

Assigned: Julien PHAM » Unassigned
Anonymous’s picture

Status: Fixed » Closed (fixed)