Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional Question on how to render links in search results #592

Open
1 of 2 tasks
woscheer opened this issue Nov 7, 2023 · 1 comment
Open
1 of 2 tasks

Additional Question on how to render links in search results #592

woscheer opened this issue Nov 7, 2023 · 1 comment

Comments

@woscheer
Copy link

woscheer commented Nov 7, 2023

Category

  • Question
  • Bug
  • [] Enhancement

Expected or Desired Behavior

I have an additional question to #374:
A list contains a hyperlink Site Column and i would like to reference the hyperlinks decription (title) in the template of the pnp search result Webpart.

Observed Behavior

The Site Column in this case is mapped to the the managed property 'RefinableString06' which is now a string representation of the
hyperlink, but the title (or description) part is missing, what can be verified in the debug view (the slot name is called 'InfoLink', and the url part of the hyperlink is rendered correctly in the search results):
"RefinableString06": "https://<tenant>.sharepoint.com/:b:/r/sites/<site>/Dokumentearchiv/CoCDeutschSept2023.pdf?csf=1&web=1&e=HQCRsv",

Debug View of RefinableString06:

pnpsearch01

List Setting of InfoLink:

pnpsearch02

Managed property Setting:

pnpsearch03

Search Result:

pnpsearch04

I have tried to use
{{getUrlField RefinableString06OWSURLH "Title"}} or
{{getUrlField RefinableString06 "Title"}}
but i always get 'undefined' for the title in the search results. I think the reason is because my RefinableString06 has somehow lost the description part of the url, because there is no comma to split the url and the title part in the RefinableString06.

Is there something I have missed?
How can i display the Title or Description part of the url field?

Thank in advance!

Steps to Reproduce

Create a Hyperlink Site Column and add it to a list, map the crawled property to a managed property like 'RefinableString06'

Thanks in advance

@wobba
Copy link
Contributor

wobba commented Nov 12, 2023

If this is related to the PnP modern search web part, ask your question at https://github.com/microsoft-search/pnp-modern-search/discussions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants