shoab shah

shoab shah

  • NA
  • 172
  • 0

Content Query WebPart not showing hyperlink

May 15 2017 2:44 AM
I am quite new to Content Query WebPart. I have a list which as a 'Hyperklink or Picture' column. I have added below markup in itemstyle.xsl to show hyperlink
 
  1. <xsl:template name="CQWPStyle" match="Row[@Style='CQWPStyle']" mode="itemstyle">  
  2.  <html>  
  3. <table width="100%">  
  4. <xsl:if test="count(preceding-sibling::*)=0">  
  5.     <tr>  
  6.     <td width="10%" valign="top"><div class="item"><b>Title</b></div></td>  
  7.     <td width="10%" valign="top"><div class="item"><b>Address</b></div></td>  
  8.     <td width="10%" valign="top"><div class="item"><b>Area</b></div></td>     
  9.     <td width="10%" valign="top"><div class="item"><b>ChoiceCol</b></div></td>    
  10.     <td width="10%" valign="top"><div class="item"><b>DateTimeCol</b></div></td>      
  11. </tr>  
  12. </xsl:if>  
  13. <tr>         
  14.     <td width="10%" valign="top">  
  15.         <div class="item">  
  16.             <xsl:value-of select="@Title" />  
  17.         </div>  
  18.     </td>  
  19.     <td width="10%" valign="top">  
  20.         <div class="item">  
  21.             <xsl:value-of select="@Address" disable-output-escaping="yes"  />  
  22.         </div>  
  23.     </td>  
  24.     <td width="10%" valign="top">  
  25.         <div class="item">  
  26.             <xsl:value-of select="@Area" />  
  27.         </div>  
  28.     </td>  
  29.     <td width="10%" valign="top">  
  30.         <div class="item">  
  31.             <xsl:value-of select="@ChoiceCol" />  
  32.         </div>  
  33.     </td>  
  34.         <td width="10%" valign="top">  
  35.         <div class="item">  
  36.             <xsl:value-of select="@DateTimeCol" />  
  37.         </div>  
  38.     </td>  
  39.     <td width="10%" valign="top">  
  40.         <div class="item">            
  41.             <!--Variable declared to read the link from the column Link-->  
  42.   
  43.             <xsl:variable name="ActualLink" select="substring-before(@HyperLinkCol,',')"/>  
  44.             <xsl:variable name="FriendlyName" select="substring-after(@HyperLinkCol,',')"/>  
  45.   
  46.             <!-- Image to the hyperlink-->  
  47.   
  48. <a href="{$ActualLink}"><xsl:value-of select="$FriendlyName"/></a>  
  49.   
  50.   
  51.   
  52.         </div>  
  53.     </td>          
  54. </tr>  
  55. </table>  
  56. </html>  
 All other columns show as expected. However, the hyperlink column does not show. Kindly let me know, what I am missing.

Answers (3)