Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-10954

Custom theme lookup path

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • None
    • 3.0.3
    • Documentation (D)
    • None

      I've been playing around with some modifications to the default theme and saw something that seems off or maybe I didn't understand:

      Acording to the documentation, custom themes must be placed in "styles/themes/mytheme/main.css". However, Zabbix searchs for the css at "styles" dir.

      This is what I did:

      At the file include/classes/core/Z.php I added the custom theme I made:

      class Z extends ZBase {
      public static function getThemes()

      { return array_merge(parent::getThemes(), array( 'custom-theme' => _('Custom Theme') )); }

      }

      Then I created the required directories and placed the .css in styles/themes/custom-theme/main.css.

      But when I assign that theme to a user, I get this error:

      "File does not exist: /usr/share/zabbix/styles/custom-theme.css".

      So it seems that Zabbix looks for the css at the styles dir. This is different from what I understand from the documentation: https://www.zabbix.com/documentation/3.0/manual/web_interface/theming

            Unassigned Unassigned
            fgallese Fabio Gallese
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: