Skip to content

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

@woscheer

Description

@woscheer

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions