Global Navigation across site collections (Peter Allen's) solution using SP Services NOT working !

Sep 17, 2012 at 1:42 PM

Hi Marc/all,

If someone has used this solution created by Peter Allen using SPServices by Marc, could I ask for some help please?

I have implemented everything according to Peter's instruction in his blog but unable to get any navigation appearing on the actual site.

No error messages are thrown and the navigation on the site is sticking to the normal default global navigation.

Below are some details of what I have implemented:

To give you an overview of the Farm/Environment and how I have implemented your solution:


  • Multi-front end setup and has approx. 50 site collections in it.
  • Uses a managed path entry for all site collections e.g. http://intranet/sites/HR where ‘sites’ is the managed path.
  • No site collections/ web apps use anonymous access as the whole setup/sites are internal.

Implementation of your ‘Top Nav solution V 2.0’

After doing all the above nothing seems to happen and there is no navigation from this custom solution displayed on ‘ development site’. Not sure if I have to do something else to get this working ? I would really appreciate if you could advise please ?

Not sure if the "siteMapDataSource" needs to be amended from the current value of "SPNavigationProvider" and set to something else in the master page ? Although I am using the default master page on the site and have included the script files in this.

Scripts are loading all fine and I have checked that by displaying couple of alerts on page load and working fine.

Please if someone has any idea and can help with this?


Sep 17, 2012 at 7:43 PM

Peter's post is an old one, and you are likely to run into a number of things you'll need to change. Debugging the script is really the only way you'll be able to get it working, given changes since Peter's post in jQuery and SPServices. You may also be using SharePoint 2010, which would require more changes, potentially.

One thing I spotted, however, is this:

$(xData.responseXML).find("[nodeName='z:row']").each(function() {

In jQuery 1.7+, this selector for the z:row namespace no longer works. I added the SPFilterNode function to SPServices to help with this. Because the selector above will find no items in the returned XML, it would help explain the results (none) you are seeing.

Sep 18, 2012 at 6:13 PM

Thanks for the reply Marc,

I did try the older jquery and the older version of SPServices and the results indeed made an appearance :)

I will see if it is in my remit to work on Peter's code and get it to work with latest SPServices & Jquery etc. , otherwise the workaround will be to use the older versions of scripts for the moment I am afraid.

Not sure if you are aware of any other global navigation across site collections solution which is available out there ?



Sep 20, 2012 at 1:24 PM

Well, at least you made progress. You should always looks at the solutions you find on the Web as starting points. Some are better than others, and rarely will they meet your full requirements. They'll require tweaking. Nothing is really free!


Oct 9, 2012 at 9:33 AM

Thanks Marc,

Was just wondering if you knew about any other possibilities which could be used to then improvise/customise to our own requirements.Cheers for reminding 'nothing is free' :-)


Jul 8, 2014 at 11:14 AM
Hi Marc,

Quite a time since I posted here about this; Hope you are well and still enjoying SP innovations.

Sorry if you're not able to answer but just wondered, based on the above discussions, if the cross site collection (Peter Allen) solution is actually working by using the older versions of jquery in a SP in one site using the default master page, BUT not working on another site where a publishing master page is in use. Exactly the same scripts and code has been implemented in exactly the same way but for some reasons, publishing master page is not displaying the nav and in fact the "alert() used for SPServices.SPGetCurrentSite() doesn't seem to be working either. This does work on another site on the same FARM where a default master page is being used.

Really unable to figure out what is exactly different which is causing this between these master pages, not getting anywhere I'm afraid.

As I said, apologies if you it's a hassle but would be useful if some direction/guidance could be suggested.

Aug 20, 2014 at 2:31 AM
I really don't understand your question. Can you explain some more?

Remember that whatever Peter came up with long ago is his work, not mine. You may have more luck asking him about it.