Module development: Difference between revisions

Jump to navigation Jump to search
Line 437: Line 437:
=== Create and declare your style sheet ===
=== Create and declare your style sheet ===
Create a style sheet CSS named '''mymodule.css''' and put it into directory '''htdocs/mymodule'''. You can have only one CSS file per module.
Create a style sheet CSS named '''mymodule.css''' and put it into directory '''htdocs/mymodule'''. You can have only one CSS file per module.
Remember it's better to use existing styles already available by default into Dolibarr (The CSS file used by Dolibarr is file '''themes/mytheme/''themename''.php.css'''. Create your own CSS file only if you need absolutely to add not already existing styles.
Remember it's better to use existing styles already available by default into Dolibarr (The CSS file used by Dolibarr is file '''themes/mytheme/''themename''.css.php'''. Create your own CSS file only if you need absolutely to add not already existing styles.
Once your style sheet is ready, declare it into your module descriptor file by modifying the property '''$this->style_sheet'''.
Once your style sheet is ready, declare it into your module descriptor file by modifying the property '''$this->style_sheet'''.
Value to put here must be a relative URL to your CSS file.
Value to put here must be a relative URL to your CSS file.

Navigation menu