This topic is locked

hide buttons , controls on view page

4/11/2017 11:26:06 AM
PHPRunner General questions
jgeorgiou author

Hi
I have added a print button on view page (i need a print on view layout).

On print button , client before used the code: window.print();return false;

  1. on before display event used $xt->assign("back_button",false); to hide back to list button from printing! How can i hide rest buttons ( edit , previous , next) from printing?
  2. I want after print to show these buttons back again so user can use them , what should i do? (should i add code to print button after client on print button?)
    thanks

Sergey Kornilov admin 4/11/2017

You need to dig into this page HTML code in Visual Editor. Here is how typical 'Back to list' button looks.

{BEGIN back_button}

<BUTTON class="btn btn-primary" {$backbutton_attrs}>

Back to list

</BUTTON>

{END back_button}


Section name is back_button and this is why you use the following code:

$xt->assign("back_button",false);


The same way you can add more code that will hide other buttons.