This topic is locked

Hide/Show 'detail' hyperlink on Master detail list page

9/13/2007 2:00:09 AM
PHPRunner General questions
R
robmid author

Hi.
I'm trying to find the location where I can add PHP code to hide or show the 'details' hyperlink on the list page, depending on whether content is present in the details.
At the moment when I hover over the details hyperlink I get Details Found: 0 even if details are available.
Any help appreciated.
Cheers Rob

Alexey admin 9/13/2007

Rob,

I'm trying to find the location where I can add PHP code to hide or show the 'details' hyperlink on the list page, depending on whether content is present in the details.

You can do this using Visual Editor and After record processed event.

On the Visual Editor click on details link, switch to HTML mode and add the following code before and after the link:

{if $row.showdetails}Details{/if}


Then add this code to After record processed event:

global $conn;

$sql = "select count(*) from Details where MasterID=".$data["ID"];

$rs = db_query($sql,$conn);

$datacount = db_fetch_numarray($rs);

if($datacount[0]>0)

$row["showdetails"]=true;



where Details, MasterID and ID are your actual table and field names.

At the moment when I hover over the details hyperlink I get Details Found: 0 even if details are available.



I wasn't able to reproduce this bug.

Please publish your project on Demo account and send a link to it to support@xlinesoft.com

I'll find what's wrong with your project inspecting it there.

The Publish on Demo account button is on the last tab in PHPRunner.