title: Static child rows (additional info) in DataTables in Twig-Template
body: <p>I'm using Symfony2 with Doctrine, Twig and DataTables. In a DataTable an overview of my entites are shown, with basic information. On click on a row I want to show additional information of the entity, as you can see <a href="https://datatables.net/examples/api/row_details.html" rel="nofollow">here</a>. </p>
  
  <p>Here is the code (where applications is a Collection of my doctrine entities):</p>
  
  <pre><code> &lt;tbody&gt;
                      {% for application in applications %}
                          &lt;tr id="application-{{ application.id }}" data-child-information="{{ application | json_encode | raw }}"&gt;
                              &lt;td&gt;
                                  {{ application.name }}
                              &lt;/td&gt;
                              &lt;td&gt;
                                  {{ application.company.name | default("") }}
                              &lt;/td&gt;
                              &lt;td&gt;
                                  {{ application.events.count }}
                              &lt;/td&gt;
                              &lt;td&gt;
                                  {{ application.dateCreate | date('d.m.Y')  }}
                              &lt;/td&gt;
                              &lt;td&gt;
                                  {% if application.dateSent %}
                                      {{ application.dateSent | date('d.m.Y')  }}
                                  {% else %}
                                      {{ application.readableStatus(constant('APPLICATION_STATUS_OPEN', application)) }}
                                  {% endif %}
                              &lt;/td&gt;
                      {% endfor %}
                      &lt;/tbody&gt;
  </code></pre>
  
  <p>The documentation says an ajax call would be used for getting the data. But since I already have the information of my entity, I don't want to used AJAX but rather create the child rows from the beginning. What would be the best practise for this? As you can see I tried to savethe json encoded entity in the data-tag, so I can read it in the javascript function (see format function in DataTables documentation.</p>