0

I'm trying to implement the search driven navigation to improve site performance and replacing the default Global Navigation using the approach given in the following link: Navigation options for SharePoint Online

But it shows all the sites that are not of the Global Navigation. Is there a way to get only those sites and the respective subsite that are part of the Top Navigation.

  • Do you just want the first level sites? What's you query looks like? – YogaPanda Dec 8 '17 at 20:52
  • I m looking for those Top Level sites that are part of the Global Navigation. Not all top level sites are part of the Global navigation. The query that i used is given in the link "Navigation Options for SharePoint Online" – Selva Dec 11 '17 at 18:09
  • The query from the link only has "baseUrl + "'contentClass=\"STS_Web\"+path:" + root..." You can modify the query to retrieve specific sites you want – YogaPanda Dec 11 '17 at 20:19
  • Yes, that is the query that i mentioned in the link which gives all the sites, even if the site does not belong to Structured Global navigation. I want to modify the somehow to get only the links that i need from root site. – Selva Dec 11 '17 at 20:40
2

"contentClass=STS_Web" simply means bring back all the sites. There's no way to use query to get your "structured global navigation" I guess what you mean is you modified the Navigation in the Site Setting, and you want the query to retrieve what you have customized (please correct me if I'm wrong)

However, you can only write a specific query; in this case; to bring back what you want.

Example: "(contentClass=STS_Web) (Title:keywordA OR Title:keywordB OR Title:keywordC)"

It's just a rough idea about to achieve what you want via KQL (keyword query language)

For further information, you can read further information from KQL Syntax Reference

| improve this answer | |
  • Hi YogaPanda , Is contentClass=STS_Web means bring all sites or just all sites with Team site template? – Mohamed El-Qassas MVP Dec 11 '17 at 21:57
  • Yes, that is the issue. The Navigation setting has been modified, to show only few sites and not all the sites. – Selva Dec 11 '17 at 22:31
  • @M.Qassas it means bring back all the webs (sites) "STS_Site" means bring back all the site collections. The article below from MSDN has further explain (blogs.msdn.microsoft.com/mvpawardprogram/2015/02/16/…) – YogaPanda Dec 12 '17 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.