Including a different jQuery version only on specific page jQuery update module is including this script.

&lt;script type="text/javascript" src="/sites/all/modules/jquery_update/replace/jquery.min.js?6"&gt;&lt;/script&gt;


I need this on every page, except a certain template file which I am using fancy box, and need a later version of jQuery.

I need to exclude jQuery update from putting the above script in the $scripts variable ONLY on page-media-photos.tpl.php. How can I achieve this?
Here are your options:


Use jQuery Multi, as mentioned in another answer. It can be configured to load the higher version of jQuery just on that page and just for the fancy box. It won't interfere with Drupal's jQuery or with jquery_update's jQuery.
In Drupal 7, you can use hook_js_alter(), which will let you swap out jquery_update's version with whatever you want.
In Drupal 6 with jQuery Update, it provides a hook that lets you alter the JS after it's done doing its thing. You can look at the jQuery Multi 6.x code to see how it uses this hook.
In Drupal 6 without jQuery Update, you can do this using a preprocess_page hook. The $scripts variable will be available there, and you can change it. This can get a bit tricky. You can also see how qmulti does this. jQuery Update also does this in a similar way.


Remember that swapping to a higher jQuery version can break some things in Drupal core and contrib, which is the problem jQuery Multi solves. So if you do this make sure you're not breaking anything. The benefit here is that you just load the jQuery you need, while with jQuery Multi you'll load both.