View Single Post
  #24  
Old 02-09-2016, 09:17 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Simple CMS module and custom page code

Quote:
If you add a resource with the "url" key, not "file", X-Cart 5 won't aggregate the file. So, this should work as you expect.

I've just tried this on my local X-Cart 5 installation and it works there exactly as I said in my previous post - it does not aggregate external scripts.
Here is what I see in the page source code:
Code:
... <script type="text/javascript" src="http://xcart/xc5/src/var/resources/js/343a30b273e2ec6c0a3f7e93f23c86c58e081f64b4faa9d3b88d21de2580196f.js?1455030625"></script> <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/nanogallery/5.9.1/jquery.nanogallery.min.js?1455030625"></script> <script type="text/javascript" src="http://xcart/xc5/src/var/resources/js/89ebbd66d82942e4e11f9f6c8f10f3caa73809350359d5d0210ff70502716007.js?1455030625"></script> ...

The code was:
PHP Code:
public function getJSFiles()
    {
        
$files parent::getJSFiles();

            
$files array_merge(
                
$files,
                array(
                    array(
                        
'url' => "//cdnjs.cloudflare.com/ajax/libs/nanogallery/5.9.1/jquery.nanogallery.min.js",
                        
'no_minify' => true
                    
),
                )
            );
 
        return 
$files;
    } 
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions

Last edited by qualiteam : 02-09-2016 at 09:20 PM.
Reply With Quote