Changing the link in a Content Query Web Part
-
16-10-2019 - |
Pergunta
I have added the Content Query Web Part to my page.
I've hooked it up to a custom list that I've added a Url column to.
The list is displaying on my page, but the link goes to the list item properties page, not to the url column within the list.
I assumed it would be straight forward to change the functionality to link to my url column instead, but I've not been able to do so.
I'm updating the following section, and I get this error message
"Url is not a valid hyperlink field or URL Path. Leave the field blank to automatically generate a link to the view properties form of the returned items."
I have confirmed that Url is the internal name of a column in the list I'm linking to.
Also the contents of the Url column are all http://www.google.com/1
How can I link to my url column in the Content Query Web Part?
Solução
Ensure the URL column is created as a hyperlink type, not as a string, and then populated with a URL.
Outras dicas
The solution we found for this is to use the field name FileRef
. If you apply the change, the Link field will reset to Name (linked to document)
, but the fileref change should stick, regardless.
Apparently, FileRef
is the internal field name for the URL field.
How Microsoft expected anyone to work this out for themselves is anyone's guess!