2

When in the contact individual summary page i have an image that i upload and it shows. When i go to the action button and use print summary. On the print page the image does not show up.

I tried adding this to /sites/all/modules/civicrm/templates/CRM/Contact/Form/Taskprint.tpl

{if !empty($imageURL)}
            <div id="crm-contact-thumbnail">
{/if}   

it does not load the image. does anyone know how to make the image load in the print summary page ?

I am using drupal and civicrm 4.6.16

EDIT

I still have not gotten this to work. I have try to add this to the Taskprint.tpl

<div class="crm-contact_image crm-contact_image-block">
  <a href="{$imageURL}" class='crm-image-popup'>
    <img src="{$imageURL}" height={$imageThumbHeight} width={$imageThumbWidth}>
  </a>
</div>

Edit 2

Thank you so much. Print.tpl was the correct file and i was able to figure out my problem with the image now i was looking in the right place. I had to add this code to the summary.tpl for it to load.

<div class="contactCardRight">
              {crmRegion name="contact-basic-info-right"}
              {if !empty($imageURL)}
                <div id="crm-contact-thumbnail">
                  {include file="CRM/Contact/Page/ContactImage.tpl"}
                </div>
              {/if}                
                </div>
              {/crmRegion}
            </div>
            <!-- end of right side -->

Thanks

  • I have tried many thing and i still can not get this to work. anyone have an idea how i can get this to work? – Zedimus May 31 '16 at 21:28
1

I don't think you're looking at the right template. When I press Print Summary, that's not the template that loads.

You can check which template is in use by pressing "Ctrl-U" to View HTML Source, then searching for ".tpl". When I do that, I see templates/CRM/Contact/Page/View/Print.tpl instead.

Above the {literal} tag, I added the {debug} tag and reloaded the page in my browser. This brought up a Smarty debug window; I confirmed that $imageURL is indeed available to this template (otherwise we'd need to add it in the corresponding PHP file).

So hopefully this is enough info to get you where you need! Update your question if not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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