I'm trying to create a bespoke Drupal theme. I have created a content type and have a template for that specific template type:
node--event.tpl.php
This loads fine and I can dump the $content
variable and see it's content. What I'm struggling with however is getting individual elements from the $content
array and outputting them on the page in the format I want. For example:
echo render($content['field_date']);
outputs:
Date:
25th December 2014...
I don't want the label however, just the date itself. Yet if I try to var_dump($content['field_date']);
it outputs the whole $content
array.
I've looked at the docs here: https://api.drupal.org/api/drupal/modules%21node%21node.tpl.php/7
But they don't go into much detail. So if anyone could give me any pointer on how to truly access the individual values in the $content
array that would be greatly appreciated.