I’ve got a symfony admin model that has a related field (doctrine). In the admin list view it displays the ID instead of the name. How can I change this?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If I remember correctly, you can use the name of the relation as fieldname in the displaylist.
But what always works is using a partial. So in your generator.yml:
And then created
_referred.phpin your templates folder, and do something like:<?php echo $modelName->Referred->name; ?>