Injection Head, how to do this?

Hallo,

I am building an own Module wich is using Datatables, I want to include on the Modulepages (or on all) some CSS and JS Files.


I have read this Topic:

http://www.boonex.com/forums/topic/How-to-add-custom-CSS-and-JS-links-on-all-pages-.htm


But I am unable to understand how to to this, can anyone give me an better example?


Thank you very much

Quote · 25 May 2014

That topic was targeting ALL pages. If your only adding css or js to your module and module pages then you would use built in commands.

addCss()
addJs()
addAdminCss()
addAdminJs()

Those are the 4 functions available for use in modules. If you search through existing boonex modules you will find them in use in several of the modules. The functions can take a single file like so.

$this -> addCss('mycss1.css') or an array of several files. $this -> addCss(array('mycss1.css','mycss2.css','mycss3.css')); The function is to be called before the final $this->_oTemplate->pageCode command the renders the module page.

https://www.deanbassett.com
Quote · 25 May 2014
 
 
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.