Thanks to visit codestin.com
Credit goes to www.zabbix.com

This is the documentation page for an unsupported version of Zabbix.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.
Table of Contents

Views

View file receives the data from a controller and then prepares the HTML look of it.

Defining view(s) for a frontend module is optional, unless the module is a widget.
Dashboard widgets need at least two views: one for the edit mode and one for the view mode (should be stored in the views directory).

It is possible to use pre-defined Zabbix HTML classes (from the /zabbix/ui/include/classes/html) in the view as well as add new HTML and CSS classes. New classes should be stored in the module's assets folder.

Example:

...
       (new CColHeader(_('Name')))

This will add a new column name Name and style the top table row as on other Zabbix pages.

Action view

This is a reference file for defining an action view.

<?php declare(strict_types = 1);
       
       /**
       * @var CView $this
       */
       
       $this->includeJsFile('example.something.view.js.php');
       
       (new CWidget())
           ->setTitle(_('Something view'))
           ->addItem(new CDiv($data['name']))
           ->addItem(new CPartial('module.example.something.reusable', [
               'contacts' => $data['contacts']
           ])
           ->show();