Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm trying to print an image field from profile2 to author pane.Here is my code:
<?php $profile = profile2_load_by_user($account,'main'); ?>
<div class="author-pane-line author-image">
<span class="author-pane-label"><?php print t('image'); ?>:</span>
<?php print check_plain($profile->field_tx['und'][0]['value']); ?>
</div>
But there is no any image,just the lable "image".
So I tried a integer field,but It print correctly.
Please help with it,thanks a lot!!
Comments
Comment #1
jay.lee.bio CreditAttribution: jay.lee.bio commentedI don't know the answer, but this might help: https://www.drupal.org/node/1360258, #7
Comment #2
jay.lee.bio CreditAttribution: jay.lee.bio commentedI just got the following to actually show up, so just change it to suit your needs: