Home › Forums › Calendar Products › Events Calendar PRO › AJAX scripts and page templates
- This topic has 7 replies, 5 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
May 11, 2012 at 2:23 pm #19046
karen
ParticipantI 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. thanksMay 14, 2012 at 7:57 am #19132Rob
MemberHi 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.
May 15, 2012 at 7:04 am #19184Henry
MemberHi 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/3915313May 15, 2012 at 7:06 am #19185Henry
MemberThat post didn’t seem to come out that great. 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/3915313May 15, 2012 at 11:13 am #19193Jonah
ParticipantHi 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,
JonahMay 15, 2012 at 12:10 pm #19200karen
Participantthanks, I’ll test it out.. !wish me luck.
May 15, 2012 at 3:29 pm #19233Rob
MemberGood luck! 🙂 Let us know what you come back with and if it gives you any trouble.
July 7, 2015 at 6:20 am #976838Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘AJAX scripts and page templates’ is closed to new replies.
