Closed bertoost closed 1 year ago
From my understanding, this is already possible:
$table->add('field', TwigColumn::class)->setTemplate('tenant/students/snippets/overview/courses.html.twig', ['var' => 'value']);
However, I do agree that it is strange that the TwigColumn
does not support this by default, so I added a PR for the feature. #254
@Ahummeling that is NOT the same. that code runs setTemplate
on the DataTable instance, not the column. It overrides the rendering of the entire table.
@Ahummeling that is NOT the same. that code runs
setTemplate
on the DataTable instance, not the column. It overrides the rendering of the entire table.
Oh, I see. My bad, sorry! Thanks for clarifying
Stale issue message
Currently you can only render a Twig template and it passes the current row and the normal value to the template. It would be cool to have the ability to add more values to the view.