This may seem a silly request / question but in my config I have set the default footer as I need to reference the page numbers, this is what I have...
footer: { height: '15mm', contents: { default: '<div class="invoice-footer">\n' + '<div class="invoice-footer__page-number">{{page}} of {{pages}}</div></div>' // fallback value } },
It would be great if I could reference the HTML template here and/or add some conditional code (using Handlebars or some mark up) something like this
This may seem a silly request / question but in my config I have set the default footer as I need to reference the page numbers, this is what I have...
footer: { height: '15mm', contents: { default: '<div class="invoice-footer">\n' + '<div class="invoice-footer__page-number">{{page}} of {{pages}}</div></div>' // fallback value } },
It would be great if I could reference the HTML template here and/or add some conditional code (using Handlebars or some mark up) something like this
footer: { height: '15mm', contents: { default: '<div class="invoice-footer">\n' + '{{#if someValueFromTheTemplate}} Hello World {{/if}}' + {{#if someValueFromTheTemplate}} {{ someValueFromTheTemplate }} {{/if}}' + '<div class="invoice-footer__page-number">{{page}} of {{pages}}</div></div>' // fallback value } },
Is something like this possible? Or can I replace the footer.contents depending on some JS logic in the config?