31,014
edits
| Line 438: | Line 438: | ||
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''.css.php'''. 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-> | |||
Once your style sheet is ready, declare it into your module descriptor file by modifying the property '''$this->modules_parts'''. | |||
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. | ||
For example '/mymodule/ | For example | ||
<source lang="php"> | |||
$this->module_parts = array('css' => array('/mymodule/css/mymodule.css.php')); | |||
</source> | |||
=== Test your style sheet === | === Test your style sheet === | ||