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
Comment #1
sterg17 commentedComment #2
TapSkill commentedWhen you find solutions, post them, even if nobody else does.
How else can we expect good documentation?
Comment #3
Slavaka commentedHello
I am pleased that he decided this issue!
code should look like this:
print $ node-> field_email [0] ['safe'];
where "field_mail" - an additional CCK fields
Warning, if you have any difficulties with these or will not work:
I first installed the module Content Templates (Contemplate)
http://drupal.org/project/contemplate, just do not know whether he will definitely need, but it is the Content Templates (Contemplate) deal with this problem!
Thanks to all developers and webmasters to DRUPAL!
All Great weekend!