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)
More Related Contents:
- How to get the value from and save to Database in php
- Decoding JSON in Twig
- Use Javascript to access a variable passed through Twig
- How to display string that contains HTML in twig template?
- Accessing session from TWIG template
- The CSRF token is invalid. Please try to resubmit the form
- Compile Error: Cannot use isset() on the result of an expression
- What is the best way to notify a user after an access_control rule redirects?
- How to render a DateTime object in a Twig template
- How can I use break or continue within for loop in Twig template?
- Set value of single object in multidimensional array in twig template
- How to make form_rest() not display a field with Symfony2?
- Symfony 2 load different template depending on user agent properties
- Use custom delimiters in the current Twig template
- How to render content from string/database with twig? [duplicate]
- do not include AcmeDemoBundle using symfony installer
- Symfony 3, Guard & Handlers
- Creating sign-in with my site functionality
- Is there a built-in way to get all of the changed/updated fields in a Doctrine 2 entity
- Docker in MacOs is very slow
- Symfony2 conceptual issue: general bundles vs. specific ones
- Symfony 3.4 Use view inside my bundle
- Doctrine Query Language get Max/Latest Row Per Group
- Symfony: Clear doctrine cache
- A YAML file cannot contain tabs as indentation
- Request headers bag is missing Authorization header in Symfony 2?
- How to check for null in Twig?
- How to cache in Symfony 2?
- Accessing Files Relative to Bundle in Symfony2
- Query on a many-to-many relationship using Doctrine with Symfony2