Skip to content
Advertisement

How to pass variable name from controller to twig file in Symfony?

I need to display image at my twig file. I am passing filename information as below:

JavaScript

In my twig file, when I put the filename directly it works.

JavaScript

But, I am not sure how to pass filename from controller to twig html file.

I already tried following lines:

JavaScript

It didn’t worked.

Can anybody please help.

Advertisement

Answer

Use concatenation for argument of email.image:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement