Adding custom css&js to pavillion

ThemeBurn SupportForumsOpenCart ThemesPavilion OpenCart ThemeAdding custom css&js to pavillion

This topic has been marked as resolved.

Hi there,

I was wondering, what would be the best way to add additional css and js files to Pavillion in order to get minified and compressed?

In my old theme, I was using a custom script to add them to the header style and script foreach loop. So they customly loaded when needed on the specific site.

Best,
Axanne

 axanne
March 3, 2015 at 11:57 am #38850

Hello Axanne,

You can use Pavilion CP > Theme Settings > Custom > Stylesheet/Javascript fields. All data stored there is combined and minified along with the other theme css and js.

BR,
ThemeBurn team

March 6, 2015 at 4:40 pm #39027

Thanks for the reply. But can I just paste the url to the script/css and it will be added?

Another problem is, that if I add it there, it will be loaded on each page and not necessarily only on the page it’s needed (like only product page), hence increasing load time.

Does your theme compress and minifies all scripts, which are loaded by default opencart (via the foreach loops in the header tpl)? If so, then I would just add the scripts i need there and it will be loaded, if needed for that page.

 axanne
March 8, 2015 at 4:20 pm #39075

Hi,

1) You will have to put CSS contents and not url

2) Unfortunately, styles and scripts added from the admin panel are always loaded.

3) For the moment Pavilion does not compress any additional styles and scripts. However we can add this feature in future updates :)

BR,
ThemeBurn team

March 11, 2015 at 4:05 pm #39173

Thanks for your reply! Indeed, I think adding compression to any additional styles & JS would be a nice think.

Could you quickly elaborate the difference between page.css.tpl and main.css.tpl? I already read the information here.

There are two sections in these css: C U S T O M S T Y L E S and EXTERNAL .

Custom styles are the css from the configuration panel, I guess. But what kind of CSS are added in External?

 axanne
March 12, 2015 at 4:15 pm #39215

Hi,

External are styles of libraries that Pavilion merges with the main stylesheet. E.g. the Fotorama gallery on the product page and the Swiper slider.

Custom styles (page.css) are those styles that are generated by Page Builder and are unique for each page.

BR,
ThemeBurn team

March 16, 2015 at 4:29 pm #39304
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.