We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 37589
    • 12 Posts
    Version: MODX Revolution 2.2.0-pl2 (traditional)

    [[!ajax-call? &alias=`[[*alias]]`]]


    I am calling an ajax script using the snippet above within my template.

    Below is the array whcih contains a list of pages I would like the ajax script to be called on. $alias = The page you are on, and $page=a page to search for:
    $page = array('about-us','404','sitemap','events');
    
    if(in_array($alias,$page))
    { 
       echo '<script src="http://code.jquery.com/jquery-latest.js"></script>';
    }
    */


    For whatever reason, I'm running into caching issues with the snippets/modx. All of the scripts are being processed externally outside of modx, and then are being included on their prospective pages with snippets.

    I have tried contacting our hosting provider and they have not found any errors, and I have changed the MODx error log and the files in FTP. It seems to specifically not want to work on all browsers except for firefox.

    Does anyone have any experience with this?