Search in support tickets

#150 – Bootstrap

Posted in ‘Support’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Monday, 04 December 2017 15:48 CET
veselinovm
Hi,

Two questions:
1. is it possible to load bootstrap.css and JC files from CDN not from local folder? - it takes long time to load every time.
2. Is it possible to load less .css files, not to be so many.

Grateful in advance,
Milos
Custom Fields
Joomla Version
3.8.2
PHP Version
7
Product
AdsManager
Product Version
3.11
Tuesday, 05 December 2017 10:30 CET
juloaadmin
You can find extension on extensions.joomla.org that will group and minified the css
like this well known ,
https://extensions.joomla.org/extension/jch-optimize/

Please note that you should check in dev before production (for CSS generally there is no lot of issue) but with JS minified and group you can have issue depending on the extensions installed.
 
Tuesday, 05 December 2017 11:05 CET
veselinovm
I have JCH and break website, even if I exclude some css and JS.
JCH is not solution...

On what php file it calls local botstrap.css so I can change it to CDN? and it is regular bootstrap file it is not modified?
Wednesday, 06 December 2017 15:22 CET
juloaadmin
bootstrap is loaded by Joomla! in the template index.php file

it will be hard to change it like this.
// Add JavaScript Frameworks

JHtml::_('bootstrap.framework');

// Add Stylesheets
$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/bootstrap.css');



I think best solution is to spend time on JCH, did you try only CSS ?
 
Thursday, 07 December 2017 09:55 CET
veselinovm
there is no way to load bootstrap from CDN?
right now it loads from ../templates/adsclarity/css/booststrap.css
is that calling from main idex.php or from somwhere else?
I tried every option with JCH, have you been using it?
Thursday, 07 December 2017 22:40 CET
juloaadmin
you can remove

$doc->addStyleSheet($this->baseurl . '/templates/' . $this->template . '/css/bootstrap.css');

and replace by

$doc->addStyleSheet("https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"');

It should works
 
Friday, 08 December 2017 14:27 CET
veselinovm
Perfect!
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.