Question

Photo of Chris Jeter

0

Printable Picture Directory

I can't seem to find a way, no matter how I structure a merge template, to create a printable directory report that includes pictures. I've scoured the manuals with no luck. Surely someone has written code to make this happen?? 

  • Photo of Leah Jennings

    0

    Hi Chris!

    We've done something similar to be able to print our staff list with pictures, however note that I am using a PDF Document Type from  the PDF Toolkit plugin. But this code should at least get you started!

    StaffContactSheet.txt

  • Photo of Karen Norris

    0

    Hey Leah,

    The link to your lava goes to a 404 page. I'd love to see it as well. I do have the pdf toolkit plugin.

  • Photo of Leah Jennings

    0

    Thanks for letting me know, Karen! Looks like the file browser didn't like .lava files, so I changed it to .txt. Just know when you upload it to the merge template, it should be .lava.

  • Photo of Craig Mashburn

    0

    Here is our pictorial directory. It is an HTML merge...

    Southwest_Print_Directory_with_Pics.html

  • Photo of Chris Jeter

    0

    Craig, your HTML merge gets me the closest so far, but I can't seem to get people's pictures to show up. It only shows blank media boxes next to each person, like no photo is available. What might I be missing?

    • Craig Mashburn

      Perhaps you are not storing your photos in the default location?


      src="{{ 'Global' | Attribute:'InternalApplicationRoot' }}{{ head.PhotoUrl }}"


      I can confirm this still works for us.

  • Photo of Jeremy Parker

    0

    A quick note - if you're noticing quirky issues where adults who are not the head of household aren't displaying with the merge template that Craig shared above, David Axelson found that the Parents filter functionality was altered in version 15.1.

    swap out this line:
    {% assign otherAdults = head | Parents %}

    with
    {% assign otherAdults = head | Property:'PrimaryFamily.Members' | Where:'GroupRoleId','3' | Where:'PersonId',head.Id,'notequal' | Select:'Person' %}

    Updated file: 
    Print_Directory_with_Pics.html

  • Photo of Emily Law

    0

    @jeremy thank you for your tip; this was super helpful! (we were wondering why the wives were missing from their families!)