I have a DataTable and want to get an item id to display more information about the item in a modal. Im using twig and dont know how to get the item id and how to display the other information in that modal window using twig.
Datatable
<td>
<a href='#ModalInfo' class="btn" data-toggle="modal" title='info'>
<i class="fa-solid fa-info text-warning" data-target="#ModalInfo"></i>
</a>
</td>
Modal
<div class="modal fade" id="ModalInfo" tabindex="-1" role="dialog" aria-labelledby="ModalCentral" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="TituloModalCentralizado">Aditional information</h5>
</button>
</div>
<div class="modal-body">
<p>Responsible: {{alerta.resp}}</p>
<p>Investment: {{alerta.investment}}</p>
</div>
javascript
<script type="text/javascript">
$('#ModalInfo').on('shown.bs.modal', function () {
$('#meuInput').trigger('focus')
})
</script>