AJAX scripts and page templates

Home Forums Calendar Products Events Calendar PRO AJAX scripts and page templates

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #19046
    karen
    Participant

    I posted this on top of a different subject and didn’t get a reply, so I will try a new post.
    I am using W3TotalCache. It is possible to load scripts by template. As best I can tell there are two templates for the events Calendar ECP-page_template and ECP-Single Template. I am not a coder so bear with me. which does the jquery.pjax.js and events.js use? or is it for both of them? That way I could load these on just one template. Perhaps that will help with the load. thanks

    #19132
    Rob
    Member

    Hi there Karen. While I’m not sure about this one myself, I want to help you out here. So I’ve asked our dev Jonah to take a look when he hits the forums later today to try and offer up any thoughts he may have. Stay tuned.

    #19184
    Henry
    Member

    Hi Karen

    I believe the jquery.pjax.js and events.js scripts are loaded globally. You can disable them but keep in mind you’ll lose some functionality.

    To disable both scripts across the whole site, add this to your functions.php file

    Of course you could then do something like this in the template header:
    http://pastie.org/3915313

    http://pastie.org/3915278

    #19185
    Henry
    Member

    That post didn’t seem to come out that great. To disable both scripts across the whole site, add this to your functions.php file

    http://pastie.org/3915278

    Of course you could then do something like this in the template header:
    http://pastie.org/3915313

    #19193
    Jonah
    Participant

    Hi Karen,

    To add to what Henry posted you could also add some conditional events page wrappers to conditionally remove those scripts when needed. I’ve got those wrappers here: https://gist.github.com/2415009

    To answer your question though… I believe jquery.pjax.js is used only on the calendar pages and events.js is used for the tooltips on the calendar and the calendar widget. So, you should be able to safely remove those scripts on all other pages except for the calendar and wherever you have the calendar widget displayed.

    I hope that helps but let us know if there’s anything else you need with this.

    Cheers,
    Jonah

    #19200
    karen
    Participant

    thanks, I’ll test it out.. !wish me luck.

    #19233
    Rob
    Member

    Good luck! 🙂 Let us know what you come back with and if it gives you any trouble.

    #976838
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘AJAX scripts and page templates’ is closed to new replies.