There is no easy way to change the wrappers for an individual display like that. The easiest thing to do is to make sure your CSS rules are not affected by the extra wrapper.
Thread Starter
iyogai
(@iyogai)
Is there a way to get rid of the wrapper and echo the plain data?
You can do this in a custom template if you want.
Using Participants Database Custom Templates
Thread Starter
iyogai
(@iyogai)
Thanks Roland for the quick replies. Really appreciate it.
I checked the link and read the related pages too but haven’t found the answer yet.
I tried:
1. $record->get_field_prop('photo','link')
2. $record->get_field_prop('photo','value')
and “echo”ed the above as well but didn’t get anything when I want the link to photos.
Please tell me what I should write in ‘src’ attribute of an ‘img’ element if I want to get the unformatted link?
PS: I’m using the ‘Custom List Template’.
-
This reply was modified 6 years, 8 months ago by
iyogai.
-
This reply was modified 6 years, 8 months ago by
iyogai.
I know this isn’t obvious, but to get the URL of the image file do something like this:
$image_url = $record->file_uri('photo');
where ‘photo’ is the name of the field.
Thread Starter
iyogai
(@iyogai)
This works like perfect. Thanks!
But Roland I’ve seen a number of other people having the same problem. Is there a source that we can refer to, to find all the functions and methods for this purpose?
Yes, of course, I meant to include this link in my post:
The Template Helper Class
Thread Starter
iyogai
(@iyogai)
I noticed you added file_uri($name)
That’s great.
Thanks a lot 🙂