I am trying to: display the files uploaded document as a image grid that belongs to any particular member account
Link to a page where the issue can be seen:
I expected to see: the image of the uploaded document or a display that says PDF with the document name
Instead, I got: the whole file location address.
Can I change that? it is the same scenario if I upload right now a file in the field below and you see the resemblance of the image I uploaded instead of the location of the file in your system.
Hello,
I assume we are talking about a custom file field created with Types plugin.
If it is, there isn't such a built-in feature within Types plugin, see our document:
https://toolset.com/documentation/customizing-sites-using-php/functions/#file
No such an option to display as you request:
the image of the uploaded document or a display that says PDF with the document name
As a workaround, for example, if it is a single instance custom file field "my-pdf" for PDF files, you can setup the HTML links manually:
<a href='[types field="my-pdf" output="raw"][/types]'><img src="<em><u>hidden link</u></em>"></a>
Thanks Luo, so that means that because the pdf is a generic image I can display it as a clickable link for the purpose of just to display any generic image instead of the address or path location of the location to the file right? did I understand it correctly? that image can be set to display over and over again for every document. That means I can create few main icons that may be used as standard in my application right?
Thanks
Miller
Dear Miller,
There is a misunderstanding, the Types custom file field, can only output the file URL, it can not display the PDF file image, the workaround I mentioned above is using HTML codes to do these:
- Display a static PDF image(icon)
- Use Types shortcode to output the file link
See our document:
https://toolset.com/documentation/customizing-sites-using-php/functions/#file
My issue is resolved now. Thank you!