Forum Discussion
iamajaythakur
Mar 30, 2023Copper Contributor
Need help in SP Modern Site for searching associated sites on homepage of a HubSite
Hello, In my tenant there is one HubSite "MainHubSite". And there are some other communications sites A,B,C,D,E,F,G,H etc. which are associated with "MainHubSite". My requirement is on Homepage of ...
- Mar 30, 2023
iamajaythakur Instead of using "Sites" in search query, use hub site DepartmentId as mentioned in this thread: How can I search for sites within my hub using PnP Modern Search?
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs
iamajaythakur
Apr 05, 2023Copper Contributor
Hi Ganesh Sir,
Thank you, it helped me to display all the associated sites on Homepage of Hubsite using PnP - Search Results webpart.
Thank you, it helped me to display all the associated sites on Homepage of Hubsite using PnP - Search Results webpart.
iamajaythakur
Apr 06, 2023Copper Contributor
ganeshsanap sir, Can we have functionality here like below?
If we reload the homepage, PnP results webpart should show all associated sites and if I search a site then it should filter out that site. Current query either shows all sites or it doesn't show any but filter out the site which we search. Can both be done at same time? I didn't find anything that will help me apply condition on the query.
If we reload the homepage, PnP results webpart should show all associated sites and if I search a site then it should filter out that site. Current query either shows all sites or it doesn't show any but filter out the site which we search. Can both be done at same time? I didn't find anything that will help me apply condition on the query.