This topic is locked

File-based Thumbnail To Detail View Example

5/26/2009 11:59:42 AM
PHPRunner General questions
S
salus1 authorDevClub member

Hello,

In a recent thread Sergey suggested to a user "...to use "View as" type "Custom" to display a thumbnail and link it to the View page. ". Would anyone happen to have an example of code required to make this possible?

Thanks

J
Jane 5/27/2009

Hi,
here is a sample:

global $data;

$value = "<a href=\"tablename_view.php?editid1=".data["FieldName"]."\"><img src=\"folder/".$value."\"></a>";



where tablename is your actual table name, FieldName is your actual field name where primary key is stored, folder is your actual directory where files are stored.