Skip to content

Commit

Permalink
Merge pull request #3368 from gabbsmo/develop
Browse files Browse the repository at this point in the history
Fix typo SPSiteURL managed property
  • Loading branch information
wobba authored Nov 29, 2023
2 parents 0e55437 + 2a655cd commit 5fd8955
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The _'SharePoint Search'_ data source retrieve items from the SharePoint search
| **Query text** | The input query text to pass to the search engine. This setting is not configurable directly in the data source options. To enable it, go to the third configuration page of the Web Part and select either a static or dynamic value (Ex: from a connected search box Web Part). See [the connection documentation](../../search-results/connections/index.md) for more information on how to configure this option. This value can be then used in the **Query template** using the `{searchTerms}` token. Also this value can be a [Keyword Query Language expression (KQL)](https://docs.microsoft.com/sharepoint/dev/general-development/keyword-query-language-kql-syntax-reference). | None.
| **Query template** | The search query template to use. It allows you to use dynamic tokens according to the context or specify conditions that should always apply to the query. | `{searchTerms}`
| **Result source ID** | Can be either a built-in result source ID listed in the dropdown, or a custom result source that you specify. Type the `GUID` of the result source, or the `SCOPE` and `NAME`, separated by `\|` (pipe character). For this to take effect, you must press _'Enter'_ to save the value. Valid scopes are `SPSiteSubscription`, `SPSite`, `SPWeb`. Examples: <ul><li>SPWeb`\|`Local News</li><li>SPSite`\|`Contracts</li><li>SPSiteSubscription`\|`Intranet</li></ul> | LocalSharePointResults
| **Selected properties** | The SharePoint managed properties to retrieve from the results. They can be used with the same name in layouts and slots afterwards.<br/><br/>To add other managed properties to the list, clear out the dropdown list field and manually type or paste the name of your managed property and press ENTER. This will add it to the list of selected properties in the query. Pasting a comma separated list of property names also work. You can validate the property is working by using the [Debug](../layouts/#debug) layout. If a list of properties is not shown, enter manually.| <ul><li>Title</li><li>Path</li><li>DefaultEncodingURL</li><li>FileType</li><li>HitHighlightedProperties</li><li>HitHighlightedSummary</li><li>AuthorOWSUSER</li><li>owstaxidmetadataalltagsinfo</li><li>Created</li><li>UniqueID</li><li>NormSiteID</li><li>NormListID</li><li>NormUniqueID</li><li>ContentTypeId</li><li>UserName</li><li>JobTitle</li><li>WorkPhone</li><li>SPSiteUrl</li><li>SiteTitle</li><li>CreatedBy</li><li>HtmlFileType</li><li>SiteLogo</li></ul>
| **Selected properties** | The SharePoint managed properties to retrieve from the results. They can be used with the same name in layouts and slots afterwards.<br/><br/>To add other managed properties to the list, clear out the dropdown list field and manually type or paste the name of your managed property and press ENTER. This will add it to the list of selected properties in the query. Pasting a comma separated list of property names also work. You can validate the property is working by using the [Debug](../layouts/#debug) layout. If a list of properties is not shown, enter manually.| <ul><li>Title</li><li>Path</li><li>DefaultEncodingURL</li><li>FileType</li><li>HitHighlightedProperties</li><li>HitHighlightedSummary</li><li>AuthorOWSUSER</li><li>owstaxidmetadataalltagsinfo</li><li>Created</li><li>UniqueID</li><li>NormSiteID</li><li>NormListID</li><li>NormUniqueID</li><li>ContentTypeId</li><li>UserName</li><li>JobTitle</li><li>WorkPhone</li><li>SPSiteURL</li><li>SiteTitle</li><li>CreatedBy</li><li>HtmlFileType</li><li>SiteLogo</li></ul>
| **Sort settings** | Configure the sort settings of the data source. Properties listed in the dropdown are all static properties marked as _'Sortable'_ in the [SharePoint search schema](https://docs.microsoft.com/sharepoint/technical-reference/). However, it does not list all possible _RefinableXXX_ or aliases fields. To use them, you must enter the value manually and press 'Enter' to validate. For a particular field, you can define if it should be used for initial sort (i.e. when the results are loaded for the first time) or be only available for users in the sort control (i.e. after the results are loaded). **The sort control does not consider default sort fields (i.e. select them by default) and you can only sort on a single field at a time according the fields you defined**. If no user sort fields are defined in the configuration, the sort control won't be displayed. | None.
| **Refinement filters** | The initial refinement filters to apply to the query. Filters has to be written using FQL ([Fast Query Language](https://docs.microsoft.com/sharepoint/dev/general-development/fast-query-language-fql-syntax-reference)) (e.g. `FileType:equals("docx")`). They will be applied every time to the current search query regardless selected filters from connected Web Parts. Note: for string expressions, use `"` instead of `'`. | None.
| **Language of the search request** | The language to use for the search request. By default the search request will be made using the current user interface language. This parameter is mainly used to process diacritics, plurals, etc. correctly according to the language. | Current UI language.
Expand Down
2 changes: 1 addition & 1 deletion docs/v3/search-parts/search-results.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Connect to a search refiners Web Part | If enable, select the search refiners We
Connect to a search verticals Web Part | If enable, select the search verticals Web Part to connect to.
Enable Query Rules | Enable the query rules if applies. Turn this options 'on' to display your SharePoint Promoted results (links only) and make result blocks available to custom renderers.
Include OneDrive results | Include OneDrive results if applicable. Turn this option 'on' to make users' personal OneDrive results available to custom renderers. Read more [here](https://docs.microsoft.com/en-us/sharepoint/support/search/private-onedrive-results-not-included).
Selected properties | The search managed properties to retrieve. You can select them from a predefined list or add them as free text if not listed. Then, these properties are available in your Handlebars template with the syntax (`item.property_name` or `property_name` inside the `{{#each}}` loop). The Web Part needs the following managed properties to get it work (`"Title,Path,Filename,SiteLogo,PreviewUrl,PictureThumbnailURL,ServerRedirectedPreviewURL,ServerRedirectedURL,HitHighlightedSummary,FileType,ServerRedirectedEmbedURL,ParentLink,owstaxidmetadataalltagsinfo,SPSiteUrl,SiteTitle,IsContainer,IsListItem,HtmlFileType,SiteId,WebId,UniqueID,OriginalPath,FileExtension,NormSiteID,NormListID,NormUniqueID,Created,contentclass,DefaultEncodingURL,Author,AuthorOWSUSER"`). **It you remove them, they will be re-added automatically on the next page refresh**.
Selected properties | The search managed properties to retrieve. You can select them from a predefined list or add them as free text if not listed. Then, these properties are available in your Handlebars template with the syntax (`item.property_name` or `property_name` inside the `{{#each}}` loop). The Web Part needs the following managed properties to get it work (`"Title,Path,Filename,SiteLogo,PreviewUrl,PictureThumbnailURL,ServerRedirectedPreviewURL,ServerRedirectedURL,HitHighlightedSummary,FileType,ServerRedirectedEmbedURL,ParentLink,owstaxidmetadataalltagsinfo,SPSiteURL,SiteTitle,IsContainer,IsListItem,HtmlFileType,SiteId,WebId,UniqueID,OriginalPath,FileExtension,NormSiteID,NormListID,NormUniqueID,Created,contentclass,DefaultEncodingURL,Author,AuthorOWSUSER"`). **It you remove them, they will be re-added automatically on the next page refresh**.
Refinement filters | The default refinement filters to apply to the query. Unlike URL `filters` params, these won't select the default values in the Search Filters WP if connected.
Enable taxonomy values localization for refiners and results | If set, the Web Part will try to translate the taxonomy term IDs to their corresponding label according to the curent UI language. Refer to the [Taxonomy values dynamic translation](#) section of this page.
Language of search request | The language to use for the search request. By default the search request will be made using the current UI language.
Expand Down
2 changes: 1 addition & 1 deletion search-parts/src/layouts/resultTypes/default_cards.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* Insert your CSS here */
</style>

<pnp-documentcard class="template--card" data-location="&lt;a style=&quot;color:{{@root.theme.palette.themePrimary}};font-weight:600;font-family:'{{@root.theme.fonts.small.fontFamily}}'&quot; href=\&quot;{{SPSiteUrl}}\&quot;&gt;{{SiteTitle}}&lt;/a&gt;"
<pnp-documentcard class="template--card" data-location="&lt;a style=&quot;color:{{@root.theme.palette.themePrimary}};font-weight:600;font-family:'{{@root.theme.fonts.small.fontFamily}}'&quot; href=\&quot;{{SPSiteURL}}\&quot;&gt;{{SiteTitle}}&lt;/a&gt;"
data-title="{{slot item @root.slots.Title}}" data-preview-image="{{slot item @root.slots.PreviewImageUrl}}" data-preview-url="{{slot item @root.slots.PreviewUrl}}" data-date="{{getDate (slot item @root.slots.Date) 'LL'}}" data-href="{{slot item @root.slots.PreviewUrl}}"
data-author="{{slot item @root.slots.Author}}" data-profile-image="/_layouts/15/userphoto.aspx?size=L&username={{slot item @root.slots.UserEmail}}" data-file-extension="{{slot item @root.slots.FileType}}" data-enable-preview="true" data-is-container="{{slot item @root.slots.IsContainer}}"
data-show-file-icon="true" data-theme-variant="{{JSONstringify @root.theme}}">
Expand Down
2 changes: 1 addition & 1 deletion search-parts/src/layouts/results/cards/CardsLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class CardsLayout extends BaseLayout<ICardsLayoutProperties> {
this.properties.documentCardFields = this.properties.documentCardFields ? this.properties.documentCardFields :
[
{ name: strings.Layouts.Cards.Fields.Title, field: 'title', value: '{{slot item @root.slots.Title}}', useHandlebarsExpr: true, supportHtml: false },
{ name: strings.Layouts.Cards.Fields.Location, field: 'location', value: `<a style="color:{{@root.theme.palette.themePrimary}};font-weight:600;font-family:'{{@root.theme.fonts.small.fontFamily}}'" href="{{SPSiteUrl}}">{{SiteTitle}}</a>`, useHandlebarsExpr: true, supportHtml: true },
{ name: strings.Layouts.Cards.Fields.Location, field: 'location', value: `<a style="color:{{@root.theme.palette.themePrimary}};font-weight:600;font-family:'{{@root.theme.fonts.small.fontFamily}}'" href="{{SPSiteURL}}">{{SiteTitle}}</a>`, useHandlebarsExpr: true, supportHtml: true },
{ name: strings.Layouts.Cards.Fields.Tags, field: 'tags', value: `<style>\n\t.tags {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t }\n\t.tags i { \n\t\tmargin-right: 5px; \n\t}\n\t.tags div {\n\t\tdisplay: flex;\n\t\tflex-wrap: wrap; \n\t\tjustify-content: flex-end; \n\t}\n\t.tags div span {\n\t\ttext-decoration: underline; \n\t\tmargin-right: auto; \n\t}\n </style>\n\n{{#if (slot item @root.slots.Tags)}}\n\t<div class="tags">\n\t\t<pnp-icon data-name="Tag" aria-hidden="true" data-theme-variant="{{JSONstringify @root.theme}}"></pnp-icon>\n\t\t<div>\n\t\t\t{{#each (split (slot item @root.slots.Tags) ",") as |tag| }}\n\t\t\t\t<span>{{trim tag}}</span>\n\t\t\t{{/each}}\n\t\t</div>\n\t</div>\n{{/if}}`, useHandlebarsExpr: true, supportHtml: true },
{ name: strings.Layouts.Cards.Fields.PreviewImage, field: 'previewImage', value: "{{slot item @root.slots.PreviewImageUrl}}", useHandlebarsExpr: true, supportHtml: false },
{ name: strings.Layouts.Cards.Fields.PreviewUrl, field: 'previewUrl' , value: "{{slot item @root.slots.PreviewUrl}}", useHandlebarsExpr: true, supportHtml: false },
Expand Down

0 comments on commit 5fd8955

Please sign in to comment.