Print to PDF Attachment Multiple Images

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dodom2
    Senior Member
    • Jan 2020
    • 198

    Print to PDF Attachment Multiple Images

    Good Morning All.

    Im trying to figure out how I can print multiple images on a PDF template using the Attachment Multiple field type. I suspect it will need to use the each feature somehow but Im unsure. Im really hoping to avoid a custom helper but it may be the only choice. Any help is appreciated
  • rabii
    Active Community Member
    • Jun 2016
    • 1250

    #2
    I think you can do so without the need for a custom helper. try this code below: If you want to use break line for each 3 images otherwise the second code will just print all images until row is completed.
    PHP Code:
    {{#each imagesIds}}
    {{#ifMultipleOf @key 3}}<br>{{/ifMultipleOf}}{{imageTag width=150 height=150 ./this}}
    {{/each}}
    
    {{#each imagesIds}}
    {{imageTag width=150 height=150 ./this}}
    {{/each}}​​ 
    
    Rabii
    Web Dev

    Comment

    • dodom2
      Senior Member
      • Jan 2020
      • 198

      #3
      YOU MY FRIEND ARE THE MAN!!! Thank you so much!

      Comment

      Working...