Results 1 to 4 of 4

Thread: Concatenation of javascript files in contao

  1. #1
    New user
    Join Date
    08-22-17.
    Posts
    15

    Default Concatenation of javascript files in contao

    My website is having lots of js files and I want to combine these files into a single file. But the problem is many of the files are loaded from core contao. I referred and implemented according to the documentation https://rocksolidthemes.com/de/conta...eit-optimieren , but it is not working as explained.

    Is there any way to concatenate these all files in my website in contao?

  2. #2
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,100

    Default

    Actually, it should work as described in the mentioned article. Did you add the |static parameter?
    Contao Community Moderator
    → Support options

  3. #3
    New user
    Join Date
    08-22-17.
    Posts
    15

    Default Concatenation of javascript files in contao

    Yes that file is present in assets as in a combined form. But the problem is, I want to combine the js file from system/modules/ vendor........ folder. This file is present in assets by writing the code
    $GLOBALS['TL_JAVASCRIPT'][] = 'system/modules/lazy-images/assets/lazysizes-gh-pages/lazysizes.min.js|static';

    But the problem is, this same file is present in head tag as
    <script src="system/modules/lazy-images/assets/lazysizes-gh-pages/lazysizes.min.js" async></script>

    I need to unset this second file. But it is from core file.. How is it possible?

  4. #4
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,100

    Default

    It gets loaded via config.php (see https://github.com/derhaeuptling/con...config.php#L17)

    However, it is possible that the JavaScript file may not be loaded intentionally via combiner class, otherwise the lazy-load script might not work properly.
    Contao Community Moderator
    → Support options

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •