Quantcast
Channel: Insane in the Main Frame
Viewing all articles
Browse latest Browse all 310

typo3 backend: show thumbnail in listview

$
0
0

I have a model with the field “image”, which is a simple VARCHAR with the image name. My extbase extension is called ophi_insta and the model is named entry. When I save the image, it is uploaded to uploads/tx_ophiinsta/ and the filename (without the path!) is saved to the database column “image”. What I want is to show the thumbnail of this image beneath the model title in the backend list view. Interestingly enough, this is quite easy: in ext_tables, where $TCA for the model is defined, the following must be added: ‘thumbnail’ => ‘image’

  1. $TCA['tx_ophiinsta_domain_model_entry'] = array(
  2. 'ctrl' => array(
  3. ....
  4. 'thumbnail' => 'image',
  5. ....
  6. ),
  7. );

I am honestly surprised that this is working.


Viewing all articles
Browse latest Browse all 310

Trending Articles