In my aplication, I have a column in the database that contains the url of a images uploaded for the user.
I desire to see the thumb for the correpondant image but I can only see the name of the image.
How could do that?
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.
You should use a partial for that (as written in the doc – or here for an other explanation (scroll down to “Partial edit”))
In your
generator.yml:Then, create a partial called
_image.phpin your foldertemplateson the same module, with this kind of content:You need to update:
$objectwith the name of your object variable given to templategetImagewith the name of your field in the table