Hide [add/gridadd] button only in detail list page

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
Satrapo
User
Posts: 41

Hide [add/gridadd] button only in detail list page

Post by Satrapo »

Hi,

I've a master table [stabile] with a detail table [utente].

I want to hide the [Add - Grid Add] Button ONLY in the utentelist.php page but I want it in the master/detail view (utentelist.php?showmaster=stabile&id=....)

I've arranged to do this editing the generated utentelist.php page this way:

<div class="ewListOtherOptions">
<?php
if(@$_GET["showmaster"] == "stabile"){
foreach ($utente_list->OtherOptions as &$option)
$option->Render("body", "bottom");
};
?>
</div>

But how can I do it in Phpmaker?


mobhar
User
Posts: 11736

Post by mobhar »


Satrapo
User
Posts: 41

Post by Satrapo »

Thanks,

I've solved, adding in page_render:

$flag = CurrentMasterTable();


if(@flag == NULL){


$this->OtherOptions["addedit"]->Items["add"]->Visible = FALSE;
$this->OtherOptions["addedit"]->Items["gridadd"]->Visible = FALSE;

};

Post Reply