Page 1 of 1
Dashlet option for custom CSS?
Posted: Tue Oct 09, 2018 8:50 am
by TBT
Developing a custom Dashlet, is there a Dashlet Option which allows the reference of a CSS file, rather than using an import rule in the Nagios Fusion CSS?
I'd prefer to keep all associated files in their respective custom Dashlet directories. Please advise.
Re: Dashlet option for custom CSS?
Posted: Tue Oct 09, 2018 9:04 am
by scottwilkerson
Fusion doesn't have the DASHLET_CSS_FILE directive like XI does although I am going to make a feature request to add it.
For the time being I would hardcode the css line as part of the html output for the dashlet, using the path to the dashlet directory in the path, something like this:
Code: Select all
$output .= "<link rel='stylesheet' type='text/css' href='" . get_base_url() . "includes/dashlets/" . $args[DASHLET_NAME] . "/YOUR_CSS_FILE.css"' />\n";
Re: Dashlet option for custom CSS?
Posted: Tue Oct 09, 2018 10:07 am
by TBT
Excellent, thank you.
Re: Dashlet option for custom CSS?
Posted: Tue Oct 09, 2018 10:13 am
by scottwilkerson
TBT wrote:Excellent, thank you.
Locking thread