klox7 VIP
Total posts: 914
31 Jul 2015 10:37

Hi,

due to sometimes slow loading og GalleriaIO I would like it to move my files to my template and include css and script in my index.php file. I tried but there is error no theme found. Can you point me where must I make additional costumization in Cobalt files to eliminta this?

Regards

Last Modified: 10 Aug 2015


Sergey
Total posts: 13,748
03 Aug 2015 15:12

From what location you load GalleriaIO? How? Show the code and tell where. In index.php of Joomla or template?


klox7 VIP
Total posts: 914
04 Aug 2015 07:12

GalleriaIO is a part of your gallery field so it's loaded in your gallery files. I would like to move js and css files of this gallery to my index file to head because now it loads kind of slow and I would like to see if it makes any change if I add it in head.

Now it's loaded with

Galleria.loadTheme('<?php echo JUri::root(TRUE); ?>/components/com_cobalt/fields/gallery/galleria/themes/azur/galleria.azur.min.js');

Sergey
Total posts: 13,748
05 Aug 2015 10:57

Bot field adds calleria to head. I still cannot get it what would be the difference?


klox7 VIP
Total posts: 914
07 Aug 2015 09:15

A OK, I read on their site that loading with Galleria.loadTheme can sometimes be slower if you are optimizing js.

Include your theme in the head

We generally recommend you to use the Galleria.loadTheme method to load themes because it’s really convenient and makes it easier to switch themes. However, you might get a snappier result if you include the theme javascript in the head tag, especially if it’s minified together with the rest of your scripts. You can also add the theme CSS file as a tag to make it load faster.

Example on how to load the theme in the head instad of using loadTheme:

<link rel="stylesheet" href="/galleria/themes/classic/galleria.classic.css"> <script src="/galleria/themes/classic/galleria.classic.min.js"></script>


Sergey
Total posts: 13,748
10 Aug 2015 07:06

Changed.

Powered by Cobalt