Jump to content

Displaying thumb image of upload field in Pages


Kirill Gromov

Recommended Posts

12 minutes ago, opentype said:

I haven’t tested it, but Daniel’s call will probably produce a processed output with complete HTML, not an individual file URL. So you can’t call that within the img src attribute. Try to output it by itself and see what it does. 

I have already tried to do this, it does not display anything

Link to comment
Share on other sites

4 hours ago, Daniel F said:

I'm sorry this method returns an array

@Daniel F Thanks, it works, BUT show thumbnail of last record in the database. I checked the table that stores thumbnails of the uploads field and I see only one record!! Thus, as soon as a new article is added to the database, the thumbnail is overwritten, and the old one is deleted. This is a bug!

Link to comment
Share on other sites

  • 2 months later...
  • 2 weeks later...

I am talking about what Kirill is talking about. ;-)
I just tested on beta 4 and the table looks okay and the output in the template works with this code

So, yeah, the bug seem to be fixed. 

I am still unsure about accessing the thumbs. 

  1. How do I access all regular images and thumbs of the same field at the same time in a template? For example to create a little gallery of the thumbs linking to the full-size images?
  2. How do I do the same in the field settings (“Listing/Display Custom Format”) where there is just $value and $formValue normally?
Link to comment
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...