Copyright ©
Mindbreeze GmbH, A-4020 Linz, 2024.
All rights reserved. All hardware and software names are trade names and/or trademarks of their respective owners.
These documents are strictly confidential. The delivery and presentation of these documents alone does not justify any rights whatsoever to our software, our services and service performance results or other protected rights. The disclosure, publication or reproduction hereof is not permitted.
For reasons of easier legibility, gender differentiation has been dispensed with. In terms of equal treatment, appropriate terms apply to both sexes.
This document describes the use of Mindbreeze InSpire Insight Apps in Microsoft SharePoint On-Prem.
The descriptions and instructions contained in this document are based on Microsoft SharePoint On-Prem.
Insight Apps are stored as text documents in Microsoft SharePoint and embedded in pages with the Content Editor Web Part. Thus, an Insight App can be used on multiple pages and still remain easy to maintain.
Copy the snippet from the Mindbreeze InSpire Designer into a text document. Click here for more information: Development of Insight Apps.
Upload the document to a document library:
Copy the address of the document to the clipboard:
Navigate to “Site Contents“ > “Site Pages“:
Choose a name and design. Create the page:
Add a new “Content Editor“ Web Part: Edit the Web Part settings:
Insert the address of the text document in “Content Link“:
Click “Stop Editing“ to finish editing a page
First, download MicrosoftSharePointOnPrem-MindbreezeScriptEditor-<xx.x.x.xxx>.sppkg from the Mindbreeze update center.
Then, go to your tenant's app catalog: https://<tenant>.sharepoint.com/sites/AppCatalog/AppCatalog
Note: In case the App Catalog is not created yet, please follow this link to create a new one.
From the left menu click “Apps for SharePoint” library. Then, upload the SPPKG or drag and drop.
Click “Deploy” from the popup window.
Note: Make sure SPPKG is deployed without errors.
From the site’s “Home” page, click “+New” then choose “Page”.
Choose “Blank” and click “Create page”.
Type a name for your page and click “Publish”.
From the top right of the page, click on “Edit”. Then click on the plus icon to add a new web part.
Type Mindbreeze in the search box and choose “Mindbreeze Script Editor”
Click on “Edit Snippet” to open the code editor.
Copy and paste the content of your insight app (exported from the Mindbreeze InSpire Designer) into the shown code editor.
At the last <script> tag of the copy/pasted HTML code snippet, you have to change the following:
<script>Mindbreeze.require(["client/application"], function(Application) {
var application = new Application({
rootEL: document.getElementById("mb-custom-searchapp-wrapper")
});
});
</script>
After:
<script>Mindbreeze.require(["client/application"], function(Application) {
window.appmb = new Application({
rootEL: document.getElementById("mb-custom-searchapp-wrapper"),
queryURLParameter: "q"
});
});
</script>
To resolve the styling conflicts between SharePoint Online and Mindbreeze, you have to edit the <link> tag exists at the top (first line) of the insight app snippet:
<link href=" https://<your-inspire>/apps/designer/../css/adapted.css" rel="stylesheet">
After:
<link href="https://<your-inspire>/apps/designer/../css/v2/minimal-prefixed-adapted.css" rel="stylesheet">
And then click on “Publish” to make the changes effective.
In order to use Mindbreeze InSpire search instead of the standard SharePoint Online search on a classic site, additional configuration steps are required.
Click on the gear icon “Site contents”
Go to the search section, then click on the “Search Settings” link.
Then you will get into the “Search Settings” configuration page.
Under “Which search results page should queries be sent to?”:
Click on the OK button – then wait for a minute to get the changes affected.
Now, search for something in the top search box and hit enter – you should be redirected to the configured results page.
Note:
This search redirect feature doesn’t apply for modern communication sites in SP2019 (On-Prem). Please check the troubleshooting section for more details.
For security reasons, browsers restrict cross-origin HTTP requests initiated from scripts. In this case, when you open https://{mytenant}.sharepoint.com in a browser, a script from your appliance’s web server is loaded. This script then initiates XHR requests to your appliance (which is in another origin, e.g. https://search.mycompany.com), which is not allowed by the CORS policies by default. To allow requests from your SharePoint tenant to your appliance, you need to add your SharePoint tenant in the allowed origins of the CORS settings of your appliance.
Configure the following in the Mindbreeze Management Center:
Configuration > Client Services > check “Advanced Settings”
You can find further information in Documentation – Mindbreeze InSpire – CORS Header.
Note: Changing the “Allowed Origins Pattern” option manually will overwrite the default values, see also Documentation – Mindbreeze InSpire – Default values.
In SharePoint 2019, unfortunately, modern sites cannot be customized to redirect search queries.
Refer here.
If the search redirect directs to a page that is not correct, check the URL. If the URL contains _layouts/15/start.aspx, the reason is probably that the SharePoint function „Minimal Download Strategy“ is activated on your site.
You can remove the _layouts/15/start.aspx part of your URL by deactivating the „Minimal Download Strategy“ function under Site Actions -> Manager Site Features.