I know you can use the Content By Query component to retrieve items under the current site, however, I want to do the opposite.
I'd like to look for items in the parent sites of the current site. I only want to look in parents that are part of the path to the current site (i.e. I don't want to look at siblings and children of the parent sites).
As an extra twist, I want to sort items based on their "distance" from the current site so that I can get the "closest" items.
The idea is to show links to pages that may exist in the parent sites of a page. If there are lots of pages, then give priority to the ones in immediate parents compared to ones further up in the tree structure.
Here's an example:
Home
---\Sport
---\Weather
---\News
---------\National
---------\International
---------------\Europe
---------------\Americas
---------------\Asia
---------------------\China
---------------------\Japan
If I'm at a page in Japan, I'd like to show links to stories in Asia, International, News and Home. I want to display links to Asia stories first, but if there are none, go ahead and look for International Stories. I don't want any National stories or Sports stories.
This is for a public site, so I want to try to use something like CBQ that has been optimized, rather than coding the logic myself and creating a poor performing component. I'm happy to use APIs, as I don't think the out-of-the-box web part is going to cut it.
Any suggestions greatly appreciated