A way to access the thumbnail of an entry in Twig #17830
-
I love the thumbnail feature in Craft. It gives authors so much context when editing entries. But a nice addition would be to give us access to that selected thumbnail in twig: entry.thumb. This would come in very handy when trying to create a search results page for a website that searches all entries. Otherwise we have to manualy get the asset field for each entry type conditionally. It's already used in the CP with a custom query i suppose when displaying the all entries page? Or am i missing something? Thanks for considering! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Element thumbnail support is very CP-specific right now – elements have a |
Beta Was this translation helpful? Give feedback.
Element thumbnail support is very CP-specific right now – elements have a
getThumbHtml()
method which is only concerned with returning HTML for the control panel. There’s nogetThumbAsset()
etc., as thumbnails aren’t necessarily based on an asset (e.g. user photos).