Forum
Display Images with PerchAdminListing add_col method
When returning an image with $Listing->add_col([]); html like
<img src=""/>
is formatted to :
<img src=""/>
How can i output the html raw so it display the image, or can you use add_col to display a image in the admin another way?
Can you show us what you're doing?
I'm creating a table of data:
Which works fine, but one column needs to be a thumbnail:
The 'thumb' value for example is '<img src="/images/my-image.jpg"/>' but that content gets run through PerchUtil.class.php with the html() method, as a string it's processed by
So basically i want to show an image in a table in the admin, but the value gets encoded before being displayed.
value
call be a callable that returns whatever code you need.Hi Drew,
Is there a way to use a database result column value in the callable, normally for example if you look at perch_gallery:
the value from 'albumSlug' is from the database results, but can you pass that result into your callable, as in;
You'll be passed the entire album
Exactly what i was looking for, awesome, thanks!