Hi everyone,
I love drupal and I am a new user and think it is fantastic. So happy to be part of this great effort.
I have a question.
I am using the node-prouduct.tpl.php file to theme my individual product pages. .. and each product has a decription and ingredients...the description field is automatic from drupal, called 'body', and I custom added the ingredients text field under content type products, with the machine readable name of 'field_ingredients'.
Here is the code I am using to display the information:
print $node->nid; ">
print '<fieldset class="collapsible"><legend>Description</legend>'; print $node->content['body']['#value']; print '</fieldset>';
print '<fieldset class="collapsible"><legend>Ingredients</legend>'; print $node->content['field_ingredients']['#value']; print '</fieldset>';
BUT THE INGREDIENTS IS NOT DISPLAYING! ITS JUST AN EMPTY COLLAPSABLE BOX. Please - if anyone can see what I am doing wrong, I would love the assistance.
Thank you so much in advance.
Comments
This
This
probably should be
since all CCK fields are set up with a delta/index even if only a single instance.
Hello I am pleased that he
Hello
I am pleased that he decided this issue!
The question is repeated, please visit http://drupal.org/node/442308
Correct format for mine.
This is the correct format, I use it myself.
<?php print $node->field_ingredients[0]['view'] ?>