COREmanager Documentation
en En
es Es
Your feedback is an opportunity for improvement!
Take part in the survey and contribute to the development of the ISPsystem ecosystem.
Take the survey

How to hide a button

In some cases it is necessary to limit the display of interface elements depending on the state of data. For example, to hide inactive buttons. You can create an XML plugin that solves the problem:

  1. Create an XML file: /etc/xml/billmgr_mod_hide.xml
    <mgrdata>
        <handler name="gotoserver_hide" type="xml">
            <event name="vds" after="yes"/>
        </handler>
    </mgrdata>
  2. Create a Bash script for the handler: /addon/gotoserver_hide
    #!/bin/bash
    
    if [[ "${PARAM_func}" == "vds" ]] ; then    
        sed "s:<toolbtn func=\"gotoserver\" name=\"gotoserver\" img=\"t-go\" type=\"window\"><hide name=\"transition\" value=\"off\"/><show name=\"status\" value=\"2\"/></toolbtn>::g"
    else
        cat
    fi
    The code in example specifies an event handler to be triggered after executing a certain action. Here, after a vds event. If the vds event is triggered, the handler uses the sed command to replace a certain button element in the XML. Changing the XML parameters allows to hide the button.
  3. Make the script executable with the command:
     chmod +x addon/gotoserver_hide
May be useful
The article was last updated on 04.07.2025. The article was prepared by technical writers of ISPsystem.