Hide Impact Analyses or Dashboard tab
Prerequisite: You must be familiar with the Syntax used in Tutorials and have already created an extension.
Hide Impact Analyses on a class
With a simple PHP iTop extension, you can hide the tab
Impact analyses
from the details of the
Change object (or any other Ticket class).
- Change
-
public function DisplayBareRelations(WebPage $oPage, $bEditMode = false) { parent::DisplayBareRelations($oPage, $bEditMode); $oPage->RemoveTab('Ticket:ImpactAnalysis'); }
Hide a Dashboard on condition
You can hide an attribute dashboard depending on an object field value
Here we suppose that the Team class as a Dashboard attribute with code = 'dashboard' and we want to hide it based on a particular condition on a team field:
- Class:Team
-
public function DisplayBareRelations(WebPage $oPage, $bEditMode = false) { parent::DisplayBareRelations($oPage, $bEditMode); if ($this->Get('notify') === 'no') $oPage->RemoveTab('Class:Team/Attribute:dashboard'); }
The identifier of the tab is the same as the dictionary
entry:
-
Class:class_name/Attribute:attribute_code
Cautious it is case sensitive and the attribute code is usually lowercase
3_1_0/customization/hidetab.txt ยท
Last modified: 2023/08/25 13:00 by 127.0.0.1