N
N
NkDev2022-04-21 21:44:09
Twig
NkDev, 2022-04-21 21:44:09

Twig in Symphony. How to use the same variable twice in a template?

Passing an array to the template:

[
      'candidates' => $candidateRepository->findAll(),
 ]

The template accesses the same variable twice.

{{ candidate.accessToken }}
{{ candidate.accessToken }}


The value is displayed only once.

Can you tell me how to use the same variable twice in a Twig template?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question