How to access dynamic variable names in twig?

I just had the same issue – and using this first answer and after some additional research found the {{ attribute(_context, 'placeholder'~invoice.id) }} should work (_context being the global context object containing all objects by name)

Leave a Comment