This topic is locked
[SOLVED]

 Changing Back to Master link to a button.

1/29/2010 12:50:19 AM
PHPRunner General questions
N
nix386 author

Hello fellow PHPRunners!
I have a need to change the back to master list link to a button instead of the ordinary text link.
I have tried to change this in the template layout for my project which appears to work but when clicked nothing happens.
This is the original code for the back to master list link in the lheader.htm



##if @TABLE.arrMasterTables.len##

{BEGIN mastertable_block}

<div id="mastertable_block{$id}">

{$showmasterfile}

<a {$backtomasterlink_attrs} class="toplinks"><b>##message BACK_TO_MASTER##</b></a>
</div>

{END mastertable_block}

##endif##


This is what I have replaced it with but I should also mention I have removed this from the lheader.htm and added it to the list.htm where I needed it to be.



##if @TABLE.arrMasterTables.len##

{BEGIN mastertable_block}

<div id="mastertable_block{$id}">

<div align="center">{$showmasterfile}</div>

<div align=center><input type=button class="button" value="##message BACK_TO_MASTER##" {$backtomasterlink_attrs}></div>

</div>

{END mastertable_block}

##endif##


If anyone can tell me why this does not work I would greatly appreciate it.
Cheers, Nick

N
nix386 author 1/29/2010

ok my bad, I found a solution while tinkering.
in the ../PhpRunner/Source/list.php I found the following line and just edited it accordingly.



//original code//$xt->assign("backtomasterlink_attrs","href=\"##@BUILDER.Tables[strDataSourceTable==@m.strMasterTable].strShortTableName##_list.##@ext##?a=return\"");
$xt->assign("backtomasterlink_attrs","href=\"##@BUILDER.Tables[strDataSourceTable==@m.strMasterTable].strShortTableName h##_list.##@ext##\" onClick=\"window.location.href='##@BUILDER.Tables[strDataSourceTable==@m.strMasterTable].strShortTableName h##_list.##@ext##?a=return'\"");


Thanks
Nick