I'm working on a Drupal 7 website. I need custom layout for some pages. so I created page–customContentTypeName.tpl.php file and it addresses perfectly.
The problem is, I need to display some fields in page tpl. The code below works fine in node tpl, but page tpl :/
<?php print $content['field_images']['#items']['0']['filename']; ?>" />
How can I call custom fields into page tpl?
Appreciate helps!! thanks a lot!!
** SORTED **
with custom field editing… here is the tutorial video: http://lin-clark.com/blog/intro-drupal-7-theming-fields-and-nodes-templates#comment-54
Best Answer
For page.tpl.php if you access the node directly you can use $node variable
else use $page variable.
but remember in a page variable you might have more than one node.