I'm using kickstart 2. I have product variation types and a content type for each product. field_desc under the content type manage fields, I have managed to hide and print render successfully in my node--product--type.tpl.php.
However, I have another field called field_spec which is a variation type field rather than a content type field. when I use the following codes in my tpl.php to hide and print the field_spec, this field is not hidden or printed where I want.
I use the following codes to hide and print both field_spec and field_desc however field_spec isn't hiding whereas field_desc is:
<?php
hide($content['field_desc']);
?>
<?php
print render($content['field_desc']);
?>
I have checked that field_spec is spelled correctly, I have cleared caches etc. however I cannot hide and print field_spec.
Is this something to do with the fact field_desc is a content type field whereas field_spec is a variation type field?
Thank you
$content['field_spec']
? it should be a render array ifhide()
is going to work its magic and put a['#printed'] = TRUE
in there.$content['field_spec']
is defined in yournode--product--type.tpl.php
file? Since you mentioned that it is not a content field, there is a good chance that it is not defined there.