0

I can't seem to print render an image on my page.tpl.php.

This is the code I use:

<?php print render($content['field_image']); ?>

I can get the title to show up though: <?php print $title; ?>

So what am I doing wrong?

1 Answer 1

0

Because you're in a page.tpl not a node.tpl, field_image isn't in $content. The only thing in $content should be regions, which contain blocks.

Use this instead: https://www.drupal.org/project/fieldblock

Here you can use fields as a block. Very easy :)

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.