URL fields in SharePoint Content Query Web Part
When a content query web part is used to query and display the items in the Links list, i got the output in a very undesirable format. As you can see in the image above, it is showing the URL of the link followed by a comma and then the link text. Also when you click on the link in will take you to the display form for that item in the links list instead of taking us directly to the URL of the link. So i started to modify the XSL to get the desired bahaviour which is It should show only the link text without the URL
The hyperlink should point to the URL rather that the display form for that item.
For this go to your site's Style Lirrary->XSL Style Sheets Download a copy of the ItemStyle.xsl I named the copy as CategoryItemStyle.xsl. Modify the content of it to this Upload the CategoryItemStyle.xsl to the Style library-> XSL Style Sheets. Then export the default the Content Query Web Part and open in it in notepad or Visual Studio Change the ItemXslLink ...