Forum Discussion
Content Search Web Part with Site Template
We are considering utilizing Content Search Web Parts (recently modified documents, popular documents) on higher-level (top 2 levels) team sites across the organization to standardize the look-and-feel as well as assist with navigation within each of the sites. In attempting to do this, I ran into a couple of issues and thought this may be a good place to find an answer. See my two questions below:
- Is there a picture that can be mapped for documents (without setting up extra fields and mapping them)? If you change the display template to "2 lines" layout, it displays a document icon (Word, Excel, PowerPoint, etc.); however, I can't seem to find a way to map that same picture to the "Picture on the left, 3 lines on right" layout. Is this possible? It would be even better if you could use a thumbnail or something from the actual document.
- I tried moving forward with the "2 lines" layout and saved the site as a template. When I create a new site from the template, it keeps the Content Search Web Parts with the correct query, mapped fields, etc. but switches the layout to "Picture on left, 3 lines on right"? Is there a way to prevent it from switching back to that layout in a newly created site from a template? I have included a couple of photos below for reference:
Picture 1 (on the left) - Content Search Web Part on original site (saved as template)
Picture 2 (on the right) - Content Search Web Part on the new site (created from template)
Lastly, this is on SharePoint Online. Thank you!
To follow-up on this, I found the post linked below that helped me resolve the issue. To resolve, I needed to update the Elements.xml file in the web template (.WSP) file and then re-save the .WSP to the Solution Gallery.
http://www.fmtconsultants.com/2014/10/solution-to-sharepoint-2013-issue-content-search-web-part-does-not-retain-properties-when-creating-a-site-from-a-custom-template/
3 Replies
- Deleted
Hi,
I was wondering if you knew the time frames for Search refresh?
I am utlising the {user.sps-location} etc in my search content webparts so I can give a more user cenbtric feel, but finding when mapping the crawled properties to the managed etc and re-indexing libraries/lists the query doesn't show anyhting. I have been waiting over an hour thus far. The problem I have is, is this a result of a bad query or because the crawled properties have not indexed correctly. Would be great if MS had a time frame so we can manage expectations better when testing.
- Michael SheaBrass Contributor
To follow-up on this, I found the post linked below that helped me resolve the issue. To resolve, I needed to update the Elements.xml file in the web template (.WSP) file and then re-save the .WSP to the Solution Gallery.
http://www.fmtconsultants.com/2014/10/solution-to-sharepoint-2013-issue-content-search-web-part-does-not-retain-properties-when-creating-a-site-from-a-custom-template/
- Deleted
Hi Michael,
you can customize the display templates to your needs. http://www.eliostruyf.com/ has a lot of examples how to do this.
KR
Paul