1

I have a base twig template that is being extended by all the user twig templates, I have a main navigation in the base template that contains the profpic of the user, I want to pass the profpic variable to base template while rendering the index template of user via same controller.. how do I do this?

Please help..

2
  • Could you provide some code? Commented Apr 23, 2016 at 10:17
  • Basically you could pass variables from one template to another like: {% include 'template.html' with {'foo': 'bar'} %}, but I am not sure I correctly understand the problem Commented Apr 23, 2016 at 10:18

1 Answer 1

2

You want make that ?

$html = $this->renderView('AccueilBundle:Reservation:billet.html.twig', array(
            'reservation'  => $reservation));
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.