title: Add Class to knp menu root Element with Twig
body: <p>what is the correct way to add a class to <code>knp_menu's</code> root element <code>&lt;ul&gt;</code> with twig?</p>
  
  <p>i tried a lot of things:</p>
  
  <p>1.</p>
  
  <pre><code>{{ knp_menu_render('main', {'class': 'foo'}) }}
  </code></pre>
  
  <p>2.</p>
  
  <pre><code>{{ knp_menu_render('main', {'attributes': {'class': 'foo'}}) }}
  </code></pre>
  
  <p>3.</p>
  
  <pre><code>{{ knp_menu_render('main', {'listAttributes': {'class': 'foo'}}) }}
  </code></pre>
  
  <p>4.</p>
  
  <pre><code>{{ knp_menu_render('main', {'attributes': {'listAttributes': {'class': 'foo'}}}) }}
  </code></pre>
  
  <p>none of them worked</p>