CSS/JS on single page - not whole system/template

Hi,

Newbie here - so pls help. I'm wondering how to add CSS/JS on single page - not whole system/template. I created a page using the page builder but not sure how to proceed. i have some simple widgets that use bootstrap and angularjs that I want to simply use on a page.

Thanks so much for suggestions.

Quote · 7 Jul 2013

Not easy. Dolphin has a system in place called injections which could be used for that. However that system relies on the pages index which is determined by a setting in the php file that generates the page. The pages that are created with the page builder all use the viewpage.php script so each page created with page builders will all use the same page index, so there is no way to single out only one page using that system. So it's not a powerfull as it could be. Boonex needs to redesign things so every page created with the page builders has a unique index. So you can't use this method.

Another method would be to edit BxDolTemplate.php and edit the section that inserts injections and have it watch for your page based on it's title and if found, do the code injections there.

Or you can use my Head Injections mod which i wrote specifically for the purpose of adding stuff within the <head> tags of a page on a per page basis. http://www.boonex.com/m/Head_Injections


https://www.deanbassett.com
Quote · 7 Jul 2013

Thanks so much Dean, you answer was spot on.

Shame that dolphin doesn't have this built in :(

One more module I definitely need to get.

Quote · 7 Jul 2013

I use head injections module for adding custom CSS to pages as well as custom js to page and it works great; the module is worth every penny of the sale price and more.  Note that it works off of the page title; so the page title needs to be fixed.  If the page title is going to change, then head injection module can not add the custom CSS and JS. 

Geeks, making the world a better place
Quote · 8 Jul 2013
 
 
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.