Problem
Description
After deploying a solution to a site or update an existing deployment, the "Find an item" search on top of List View Webpart is shown even it was deactivated in source solution.
Configuration in source solution:
List View Webpart property: Display search box
Technical Background
The InplaceSearchEnabled property of XsltListViewWebPart cannot be changed programmatically by CSOM we need for publishing.
As we want to keep understandable behavior of configuration on deployed site, it's not possible to override the ootb functionality in deployed solutions.
Solution
Since a deployment update set this property back in target site if changes in the package exists, the option to set this property manually in each List View Webpart after initial deployment is not a persistent solution.
Therefore these are two workarounds to hide this search input in target sites (deployments):
Option 1: Use Theme Designer with custom styles
With skybow theme designer Add-In installed in your source site it's simple to apply a style that hides this search box on all or specific pages. With Package and Publish these styles will be deployed to the target site where no installatin of skybow theme designer is needed.
The Add-In is available here for download: Release Downloads SharePoint Add-Ins
- Create a new theme (e.g. "hideLVsearchbox") with this style rule:
.ms-InlineSearch-DivBaseline {
display:none;
} - Apply this new theme to the pages where you want hide this search box
- Package and Publish the solution to the target site.
You can apply this theme to all pages or just to specific pages in your solution where you want hide the search box.
Option 2: Add Content Editor Webpart with styles
- Add a Content Editor Webpart to the page in your source solution where you have List View Webpart with search input
- Add this style to Content Editor Webpart (Edit Source):
<style type="text/css">
.ms-InlineSearch-DivBaseline {
display:none;
}
</style> - Package and Publish the solution to the target site.
This style hides "Find an item" search inputs on all List View Webpart on the page where it's placed.
Comments
0 comments
Please sign in to leave a comment.