1

I am trying to add a search results web part to a publishing layout page. This is a publishing page layout based on the built in article content type. This is in a SharePoint Online environment.

I have followed these 2 articles

https://veenstra.me.uk/2015/11/24/office-365sharepoint-2013-adding-a-search-result-web-part-to-a-page-layout/

https://blogs.technet.microsoft.com/sharepointwarrior/2013/08/15/sharepoint-2013-workaround-cannot-add-web-part-to-community-portal-page/

At this point, I have a search results web part configured on my publishing layout page. I have my own guid in the __WebPartId attribute and I have a register statement for the Microsoft.Office.Server.Search.WebControls. However, when I render a page based on this publishing layout page, I see nothing for search results.

I need this on the publishing layout page because we are planning to create many articles based on this layout. The search results web part is going to search against a result source based on the value in a field on the page. Thus, the search results will act as a related articles section on the page. If I decide to add the search results web part to the page instead of the publishing layout page, it works. However, this is not an option as we will have many pages.

Any ideas? Should this work or is it not possible?

Thanks

Your Answer

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

Browse other questions tagged or ask your own question.