title: Add a variable to all rendering
body: <p>I'm operating on a symfony application and I would like to set a new variable from all controllers to all rendering.</p>
  
  <p>The reason is that something in my footer has become dynamic and in compliance with the MVC pattern I'd like to put the processing of this new data in my controllers.</p>
  
  <p>What is the good way to do this with symfony ?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I am not using symfony as a REST API, the Symfony server is only serving twig rendered templates as HTML.</p>
  
  <p><strong>Details on my case</strong> :</p>
  
  <p>the current twig template has hard-coded titles for a form :</p>
  
  <pre><code>&lt;div&gt;
      &lt;h2&gt;Today&lt;/h2&gt;
      &lt;!-- today's inputs .... --&gt;
  &lt;/div&gt;
  &lt;div&gt;
      &lt;h2&gt;Tomorrow&lt;/h2&gt;
      &lt;!-- tomorrow's inputs .... --&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I'd like to give to variables to my views : <code>$today</code> and <code>$tomorrow</code>.
  This way I'd be able to render day names instead of today or tomorrow.</p>
  
  <pre><code>&lt;div&gt;
      &lt;h2&gt;{{ today }}&lt;/h2&gt;
      &lt;!-- today's inputs .... --&gt;
  &lt;/div&gt;
  &lt;div&gt;
      &lt;h2&gt;{{ tomorrow }}&lt;/h2&gt;
      &lt;!-- tomorrow's inputs .... --&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>For example if today is Tuesday, variables has to be assigned this way :
  <code>$today = "Tuesday"</code> and <code>$tomorrow = "Wednesday"</code>.</p>
  
  <p><strong>What's more</strong></p>
  
  <p>This is not a question about this specific case. I'd like to now if there is a way to pass a variable to all views without editing all controllers. As I see it, I'd put a parent action to all controller to generate this variable. I just wanted to know if this is the usual way.</p>
  
  <p>I don't want to use ajax calls, and I don't want to put complex twig code inside my template. I want to handle this via controllers.</p>