Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
3
Answers
Content Query WebPart not showing hyperlink
shoab shah
7y
319
1
Reply
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
<
xsl:template
name
=
"CQWPStyle"
match
=
"Row[@Style='CQWPStyle']"
mode
=
"itemstyle"
>
<
html
>
<
table
width
=
"100%"
>
<
xsl:if
test
=
"count(preceding-sibling::*)=0"
>
<
tr
>
<
td
width
=
"10%"
valign
=
"top"
>
<
div
class
=
"item"
>
<
b
>
Title
</
b
>
</
div
>
</
td
>
<
td
width
=
"10%"
valign
=
"top"
>
<
div
class
=
"item"
>
<
b
>
Address
</
b
>
</
div
>
</
td
>
<
td
width
=
"10%"
valign
=
"top"
>
<
div
class
=
"item"
>
<
b
>
Area
</
b
>
</
div
>
</
td
>
<
td
width
=
"10%"
valign
=
"top"
>
<
div
class
=
"item"
>
<
b
>
ChoiceCol
</
b
>
</
div
>
</
td
>
<
td
width
=
"10%"
valign
=
"top"
>
<
div
class
=
"item"
>
<
b
>
DateTimeCol
</
b
>
</
div
>
</
td
>
</
tr
>
</
xsl:if
>
<
tr
>
<
td
width
=
"10%"
valign
=
"top"
>
<
div
class
=
"item"
>
<
xsl:value-of
select
=
"@Title"
/>
</
div
>
</
td
>
<
td
width
=
"10%"
valign
=
"top"
>
<
div
class
=
"item"
>
<
xsl:value-of
select
=
"@Address"
disable-output-escaping
=
"yes"
/>
</
div
>
</
td
>
<
td
width
=
"10%"
valign
=
"top"
>
<
div
class
=
"item"
>
<
xsl:value-of
select
=
"@Area"
/>
</
div
>
</
td
>
<
td
width
=
"10%"
valign
=
"top"
>
<
div
class
=
"item"
>
<
xsl:value-of
select
=
"@ChoiceCol"
/>
</
div
>
</
td
>
<
td
width
=
"10%"
valign
=
"top"
>
<
div
class
=
"item"
>
<
xsl:value-of
select
=
"@DateTimeCol"
/>
</
div
>
</
td
>
<
td
width
=
"10%"
valign
=
"top"
>
<
div
class
=
"item"
>
<!--Variable declared to read the link from the column Link-->
<
xsl:variable
name
=
"ActualLink"
select
=
"substring-before(@HyperLinkCol,',')"
/>
<
xsl:variable
name
=
"FriendlyName"
select
=
"substring-after(@HyperLinkCol,',')"
/>
<!-- Image to the hyperlink-->
<
a
href
=
"{$ActualLink}"
>
<
xsl:value-of
select
=
"$FriendlyName"
/>
</
a
>
</
div
>
</
td
>
</
tr
>
</
table
>
</
html
>
All other columns show as expected. However, the hyperlink column does not show. Kindly let me know, what I am missing.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
Challenges for Retrieving of SharePoint Documents??
Need to exclude weekends during Pause action