Hi,
I'm new to Drupal, I have a book that is getting me started, and I also browse the documentation but there is one question that bugs me. I have the following set up:
I override node.tpl.php for a specific content type. I want to display an image which is linked to another page thus the content type has a link field where you enter the link and an image field to upload the image. (I know the token module let's you do this kind of stuff although it's yet unclear to me how exactly but that is not the point)
echo l(drupal_render($content['field_image']),$field_link_to["und"][0]["url"],array("html" => true));
This works brilliantly. As you can see I used the flattened $node reference to the url field. This is because I have noticed something weird when I dprint_r($content)
, namely all fields I have (and I mean all) appear under the first field and this seems weird to me, I don't know if this is how it should be but it seems very weird that the other fields are not siblings of the first field.