css overides for modules

Hi all,

I am an experienced fullstack developer but new to dolphin. I am modifying a template and would like to understand the override system for the css files a little more. I understand that specific template files override that of the base but also notice in the <head> that some module's css is loaded after the template files. this leaves me either having to modify the modules css or inserting a custom.css in the teplates _header (my preffered option)

 

is there a tag like <bx_tmpl_css /> that gives me the path to the current template's css? OR <bx_tmpl_root /> that does the same but for the templates root dir from whihc I can append the rest of the path?

 

I understand I can hard code the css path in the _header but that's hardly flexible enough is it?

..nor is editing the modules css

 

lastly... can the modules template be overridden in the same way as tempaltes? i.e. adding a tmpl_eve/css/default.css file within the module's dir?

 

 

all help much appreciated

Quote · 8 Oct 2016

 

lastly... can the modules template be overridden in the same way as tempaltes? i.e. adding a tmpl_eve/css/default.css file within the module's dir?


Yes. And that is how it is suppose to be done.

Best to download a few free templates from the market and look them over. You will get a better understanding on how a template is put together.

https://www.deanbassett.com
Quote · 9 Oct 2016

 

is there a tag likethat gives me the path to the current template's css? ORthat does the same but for the templates root dir from whihc I can append the rest of the path?

I would suggest to add custom css in the constructor of your BxTemplConfig class:

$GLOBALS['oSysTemplate']->addCss('custom.css');

So it will be gzipped, minified and placed to the single css file.

Rules → http://www.boonex.com/terms
Quote · 9 Oct 2016
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.