[SOLVED] Thumbnail Image On List As Hyperlink To Detail |
5/27/2013 15:35:22 | |
| PHPRunner General questions | ||
|
S
salus1 authorDevClub member
Does anyone know how to configure a thumbnail image on a list view as a link to the corresponding record's detail page? |
||
|
C
|
cgphp 5/27/2013 |
<a href="url/of/the/detail/page"><img src="path/to/the/image" alt="image"/></a> |
|
|
S
|
salus1 authorDevClub member 5/27/2013 |
|
Thanks for this info. |
|
|
C
|
cgphp 5/27/2013 |
|
What is the url of the image? |
|
|
S
|
salus1 authorDevClub member 5/27/2013 |
|
Thanks again for looking at this. |
|
|
C
|
cgphp 5/27/2013 |
|
The image is rendered with the tag "img" and this tag has a "src" attribute. That attribute is the link to the image. You can render an image calling a PHP script or with a direct URL to the image file. Your src attribute should have a link starting as mfhandler.php?filename=........ Hope to be clear. |
|
|
S
|
salus1 authorDevClub member 5/27/2013 | |
|
C
|
cgphp 5/27/2013 |
|
filename and key1 are the dynamic parameters of the URL. Replace their values with the corresponding fields values accessing the $data array. More info here: http://xlinesoft.com/phprunner/docs/_view_as__settings_custom.htm |
|
|
S
|
salus1 authorDevClub member 5/27/2013 |
|
The problem is that there is no way to configure the field as "Custom", only "Image" of "File" are available in the 'view As" tab. |
|
|
C
|
cgphp 5/27/2013 |
|
Custom is grey out but you can use it anyway. |
|
|
S
|
salus1 authorDevClub member 5/27/2013 |
|
OK, I tried every permutation I could in the Custom editor... |
|
|
|
Sergey Kornilov admin 5/27/2013 |
|
Instead of $data["editid1"] you need to use $data["KeyColumnName"]. Replace KeyColumnName with the actual key column name, case-sensitive. |
|
|
S
|
salus1 authorDevClub member 5/27/2013 |
|
Hello, |
|
|
S
|
salus1 authorDevClub member 5/28/2013 |
|
Theoretically the Custom code for the thumbnail in the example database to link to the detail page would look something like... |
|
|
S
|
salus1 authorDevClub member 5/28/2013 |
|
After fooling with single and double quotes here is the working Custom code... $value='<a href = "http://demo.asprunner.net/rsalusbury_msn_com/ImageLink/Table1_view.php?editid1='.$data["Serial"].'">
|
|